File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -634,6 +634,7 @@ lib.getTargetArray = function(trace, transformOpts) {
634634lib . minExtend = function ( obj1 , obj2 ) {
635635 var objOut = { } ;
636636 if ( typeof obj2 !== 'object' ) obj2 = { } ;
637+ var arrayLen = 3 ;
637638 var keys = Object . keys ( obj1 ) ;
638639 var i , k , v ;
639640
@@ -643,7 +644,11 @@ lib.minExtend = function(obj1, obj2) {
643644 if ( k . charAt ( 0 ) === '_' || typeof v === 'function' ) continue ;
644645 else if ( k === 'module' ) objOut [ k ] = v ;
645646 else if ( Array . isArray ( v ) ) {
646- objOut [ k ] = v . slice ( ) ;
647+ if ( k === 'color' || k === 'colorscale' ) {
648+ objOut [ k ] = v . slice ( ) ;
649+ } else {
650+ objOut [ k ] = v . slice ( 0 , arrayLen ) ;
651+ }
647652 } else if ( v && ( typeof v === 'object' ) ) objOut [ k ] = lib . minExtend ( obj1 [ k ] , obj2 [ k ] ) ;
648653 else objOut [ k ] = v ;
649654 }
You can’t perform that action at this time.
0 commit comments