Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

prune global-level trace attributes that are already defined in a trace #3158

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 11 commits into from
Oct 30, 2018
Merged
Prev Previous commit
Next Next commit
properly delete nested attributes, update doc crawl
  • Loading branch information
antoinerg committed Oct 25, 2018
commit 79995174e03cda5bc1bd76a16591a3dea3de43fc
5 changes: 3 additions & 2 deletions 5 src/plot_api/plot_schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ exports.get = function() {
* @param {String} attrName name string
* @param {object[]} attrs all the attributes
* @param {Number} level the recursion level, 0 at the root
* @param {String} fullAttrString full attribute name (ie 'marker.line')
* @param {Number} [specifiedLevel]
* The level in the tree, in order to let the callback function detect descend or backtrack,
* typically unsupplied (implied 0), just used by the self-recursive call.
Expand Down Expand Up @@ -466,9 +467,9 @@ function getTraceAttributes(type) {

// prune global-level trace attributes that are already defined in a trace
exports.crawl(copyModuleAttributes, function(attr, attrName, attrs, level, fullAttrString) {
delete copyBaseAttributes[fullAttrString];
Lib.nestedProperty(copyBaseAttributes, fullAttrString).set(undefined);
// Prune undefined attributes
if(attr === undefined) delete copyModuleAttributes[fullAttrString];
if(attr === undefined) Lib.nestedProperty(copyModuleAttributes, fullAttrString).set(undefined);
});

// base attributes (same for all trace types)
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.