File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -85,13 +85,14 @@ module.exports = function toSVG(gd, format) {
8585 . appendChild ( geoFramework . node ( ) ) ;
8686 }
8787
88- // now that we've got the 3d images in the right layer, add top items above them
89- // assumes everything in toppaper is a group, and if it's empty (like hoverlayer)
90- // we can ignore it
88+ // now that we've got the 3d images in the right layer,
89+ // add top items above them assumes everything in toppaper is either
90+ // a group or a defs, and if it's empty (like hoverlayer) we can ignore it.
9191 if ( fullLayout . _toppaper ) {
92+ var nodes = fullLayout . _toppaper . node ( ) . childNodes ;
9293
93-
94- var topGroups = fullLayout . _toppaper . node ( ) . childNodes ;
94+ // make copy of nodes as childNodes prop gets mutated in loop below
95+ var topGroups = Array . prototype . slice . call ( nodes ) ;
9596
9697 for ( i = 0 ; i < topGroups . length ; i ++ ) {
9798 var topGroup = topGroups [ i ] ;
You can’t perform that action at this time.
0 commit comments