Skip to content

Commit 174b640

Browse files
committed
make sure array containers set to null in frames are honored
1 parent d0953a0 commit 174b640

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/plots/plots.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -1578,15 +1578,20 @@ plots.extendObjectWithContainers = function(dest, src, containerPaths) {
15781578
if(!srcContainer) continue;
15791579

15801580
destProp = Lib.nestedProperty(dest, containerPaths[i]);
1581-
15821581
destContainer = destProp.get();
1582+
15831583
if(!Array.isArray(destContainer)) {
15841584
destContainer = [];
15851585
destProp.set(destContainer);
15861586
}
15871587

15881588
for(j = 0; j < srcContainer.length; j++) {
1589-
destContainer[j] = plots.extendObjectWithContainers(destContainer[j], srcContainer[j]);
1589+
var srcObj = srcContainer[j];
1590+
1591+
if(srcObj === null) destContainer[j] = null;
1592+
else {
1593+
destContainer[j] = plots.extendObjectWithContainers(destContainer[j], srcObj);
1594+
}
15901595
}
15911596

15921597
destProp.set(destContainer);

0 commit comments

Comments
 (0)