Skip to content

incorrect use of mergeWith causing mutation to _fullLayout #1204

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

Merged
merged 2 commits into from
Sep 26, 2018

Conversation

jonmmease
Copy link
Contributor

While testing the barpolar trace in a FigureWidget I came across an error where certain Python update operations did not result in the expected change to the barpolar trace. After hours of Python/JavaScript debugging I found the source. The lodash mergeWith operation mutates the first argument and we were treating it as though it did not mutate any of the arguments. The fix is simply to pass an empty object as the first argument (7255511).

While debugging, I noticed that the createDeltaObject function was sometimes returning a delta object that included property values that were functions. This didn't seem to be causing any problems, but the result of createDeltaObject is the object that is serialized and sent back to the Python side so it's more consistent to remove these function properties here (1a04fbb).

@jonmmease jonmmease merged commit d3d54be into master Sep 26, 2018
@nicolaskruchten nicolaskruchten deleted the bug_mergeWith branch June 19, 2020 16:14
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.

1 participant