Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add check for undefined/null before calling Object.keys #185

Merged
merged 1 commit into from
Jul 14, 2022

Conversation

bc-evan-johnson
Copy link
Contributor

What? Why?

The new getValue function in helpers/lib/common.js was missing a check needed to safely handle cases like

getValue(globals, {a: undefined}, 'a.b');

How was it tested?

Unit test cases added for both getValue and one of the helpers using it.


cc @bigcommerce/storefront-team

@bc-evan-johnson bc-evan-johnson force-pushed the get-value-undef-check branch from e15b3ee to ddcfdab Compare July 13, 2022 20:33
@jairo-bc jairo-bc merged commit ce2948b into bigcommerce:master Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants