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

Commit 7999517

Browse filesBrowse files
committed
properly delete nested attributes, update doc crawl
1 parent f168ddc commit 7999517
Copy full SHA for 7999517

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎src/plot_api/plot_schema.js

Copy file name to clipboardExpand all lines: src/plot_api/plot_schema.js
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ exports.get = function() {
112112
* @param {String} attrName name string
113113
* @param {object[]} attrs all the attributes
114114
* @param {Number} level the recursion level, 0 at the root
115+
* @param {String} fullAttrString full attribute name (ie 'marker.line')
115116
* @param {Number} [specifiedLevel]
116117
* The level in the tree, in order to let the callback function detect descend or backtrack,
117118
* typically unsupplied (implied 0), just used by the self-recursive call.
@@ -466,9 +467,9 @@ function getTraceAttributes(type) {
466467

467468
// prune global-level trace attributes that are already defined in a trace
468469
exports.crawl(copyModuleAttributes, function(attr, attrName, attrs, level, fullAttrString) {
469-
delete copyBaseAttributes[fullAttrString];
470+
Lib.nestedProperty(copyBaseAttributes, fullAttrString).set(undefined);
470471
// Prune undefined attributes
471-
if(attr === undefined) delete copyModuleAttributes[fullAttrString];
472+
if(attr === undefined) Lib.nestedProperty(copyModuleAttributes, fullAttrString).set(undefined);
472473
});
473474

474475
// base attributes (same for all trace types)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.