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

Add guard for undefined objects in addModifier #1667

Merged
merged 1 commit into from Jun 4, 2019

Conversation

Projects
None yet
4 participants
@lencioni
Copy link
Member

commented Jun 4, 2019

After updating to v20.2.1, we started seeing a handful of errors about
undefined is not an object coming from these addModifier calls. It
isn't entirely clear to me how this happens, but I think we can prevent
it from being a problem by adding some guards in these codepaths.

@coveralls

This comment has been minimized.

Copy link

commented Jun 4, 2019

Coverage Status

Coverage remained the same at 84.14% when pulling d6304cb on undefined into ae3b1a6 on master.

@nkinser

nkinser approved these changes Jun 4, 2019

@ljharb

ljharb approved these changes Jun 4, 2019

Copy link
Member

left a comment

Change seems fine, but I’d prefer not to merge it without a regression test.

@lencioni

This comment has been minimized.

Copy link
Member Author

commented Jun 4, 2019

@ljharb Totally agreed about the test, but I wasn't sure how this could happen so I wasn't sure how to write the test. Reading over the code again though, I think I see what I got confused about and I'll try to get a test in (I think I can also simplify my change).

Add guard for undefined objects in addModifier
After updating to v20.2.1, we started seeing a handful of errors about
`undefined is not an object` coming from these addModifier calls. It
isn't entirely clear to me how this happens, but I think we can prevent
it from being a problem by adding some guards in these codepaths.

@lencioni lencioni force-pushed the undefined branch from e2d15fc to d6304cb Jun 4, 2019

@lencioni

This comment has been minimized.

Copy link
Member Author

commented Jun 4, 2019

@ljharb PR updated, PTAL

@ljharb

ljharb approved these changes Jun 4, 2019

@lencioni lencioni merged commit d6304cb into master Jun 4, 2019

2 of 3 checks passed

continuous-integration/travis-ci/push The Travis CI build is in progress
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 84.14%
Details

@ljharb ljharb deleted the undefined branch Jun 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.