Skip to content

Fix undeclared variables and null guard in cart.js - #949

Open
saurabhhhcodes wants to merge 1 commit into
Anjaliavv51:mainfrom
saurabhhhcodes:fix/Retro-batch-4
Open

Fix undeclared variables and null guard in cart.js#949
saurabhhhcodes wants to merge 1 commit into
Anjaliavv51:mainfrom
saurabhhhcodes:fix/Retro-batch-4

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

Fixed cart.js: added const declarations for itemPrices and loop variable to avoid implicit globals, and improved null guard in addToCart to handle cases where only one of name/price is null.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, @saurabhhhcodes! 🎉 Thank you for submitting your pull request. Your contribution is valuable and we appreciate your efforts to improve our project.We will promptly review your changes and offer feedback. Keep up the excellent work!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant