Skip to content

Conversation

@Harshul23
Copy link

Description

The calculateColor function was assigned to an implicit global variable instead of using a proper declaration keyword, causing potential hoisting issues and strict mode violations.

Changes

  • Added const keyword to calculateColor function declaration in 5-browser-extension/solution/src/index.js
  • Rebuilt webpack bundle to reflect the change
// Before
calculateColor = async (value) => {
  // ...
};

// After
const calculateColor = async (value) => {
  // ...
};

Fixes #1547

Copilot AI and others added 3 commits November 2, 2025 09:56
@Harshul23
Copy link
Author

@Harshul23 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

browser-extension project: Fix calculateColor Function Declaration

1 participant