Skip to content

Conversation

Copy link

Copilot AI commented Nov 2, 2025

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 microsoft#1547

Original prompt

Fix this issue microsoft#1547 and create a PR


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix issue 1547 in Web Dev For Beginners Fix calculateColor function declaration in browser-extension Nov 2, 2025
Copilot AI requested a review from Harshul23 November 2, 2025 10:04
Copilot finished work on behalf of Harshul23 November 2, 2025 10:04
@Harshul23
Copy link
Owner

@copilot I am confused, I want that this PR should be created in @microsoft/Web-Dev-For-Beginners not in fornked one I have.

Copy link
Author

Copilot AI commented Nov 2, 2025

@copilot I am confused, I want that this PR should be created in @microsoft/Web-Dev-For-Beginners not in fornked one I have.

This is the correct workflow for contributing to the microsoft/Web-Dev-For-Beginners repository. The changes are made in your fork (Harshul23/Web-Dev-For-Beginners), and then you create a pull request from your fork's branch to the upstream microsoft repository.

To create a PR to microsoft/Web-Dev-For-Beginners:

  1. Go to https://github.com/microsoft/Web-Dev-For-Beginners
  2. Click "New Pull Request"
  3. Click "compare across forks"
  4. Set base repository to: microsoft/Web-Dev-For-Beginners (base: main)
  5. Set head repository to: Harshul23/Web-Dev-For-Beginners (compare: copilot/fix-issue-1547)
  6. Click "Create Pull Request"

This is the standard GitHub fork contribution workflow - your changes are already ready to be submitted to the microsoft repository.

Copilot finished work on behalf of Harshul23 November 2, 2025 10:47
@Harshul23 Harshul23 marked this pull request as ready for review November 2, 2025 10:55
@Harshul23 Harshul23 merged commit 8abe75d into main Nov 2, 2025
1 check passed
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

2 participants