Skip to content

Clone input trace #1136

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

Closed
wants to merge 3 commits into from
Closed

Clone input trace #1136

wants to merge 3 commits into from

Conversation

dy
Copy link
Contributor

@dy dy commented Nov 11, 2016

This fixes #1083.
I guess making sure that input trace data for addTraces is cloned, at least in shallow fashion, is a good move.


// make sure traces do not repeat existing ones
traces = traces.map(function(trace) {
return Lib.extendFlat({}, trace);
Copy link
Contributor

Choose a reason for hiding this comment

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

@dfcreative Thanks for looking into 🍻 I believe this leads to the desired behaviour. We'll wait for @cpsievert to reply to #1083 (comment) to confirm though.

Do you know exactly why passing existing trace objects to addTraces cause an infinite loop?

Copy link
Contributor

Choose a reason for hiding this comment

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

Desired behavior confirmed in #1083 (comment)

@etpinard etpinard added this to the v1.20.0 milestone Nov 14, 2016
@etpinard etpinard removed this from the v1.20.0 milestone Nov 14, 2016

// make sure traces do not repeat existing ones
traces = traces.map(function(trace) {
return Lib.extendFlat({}, trace);
Copy link
Contributor

Choose a reason for hiding this comment

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

@dfcreative now that the desired behavior is confirmed. before merging:

TODO

image

  • add test case in this suite

Copy link
Contributor

Choose a reason for hiding this comment

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

@dfcreative I'd love to get this fix in the next patch release.

Are you available to ✅ the TODO list above today?

If not, no rush, I'll gladly take over this PR.

@etpinard
Copy link
Contributor

Obsolete by #1175

@etpinard etpinard closed this Nov 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problems with addTraces and scattergl
2 participants