File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -628,15 +628,15 @@ TraceManager.prototype.updateFilter = function(group, keys) {
628628} ;
629629
630630TraceManager . prototype . updateSelection = function ( group , keys ) {
631-
632- if ( keys !== null && ! Array . isArray ( keys ) ) {
631+
632+ if ( keys !== null && keys !== undefined && ! Array . isArray ( keys ) ) {
633633 throw new Error ( "Invalid keys argument; null or array expected" ) ;
634634 }
635635
636636 // if selection has been cleared, or if this is transient
637637 // selection, delete the "selection traces"
638638 var nNewTraces = this . gd . data . length - this . origData . length ;
639- if ( keys === null || ! this . highlight . persistent && nNewTraces > 0 ) {
639+ if ( keys === null || keys === undefined || ! this . highlight . persistent && nNewTraces > 0 ) {
640640 var tracesToRemove = [ ] ;
641641 for ( var i = 0 ; i < this . gd . data . length ; i ++ ) {
642642 if ( this . gd . data [ i ] . _isCrosstalkTrace ) tracesToRemove . push ( i ) ;
@@ -655,7 +655,7 @@ TraceManager.prototype.updateSelection = function(group, keys) {
655655 }
656656 }
657657
658- if ( keys === null ) {
658+ if ( keys === null || keys === undefined ) {
659659
660660 Plotly . restyle ( this . gd , { "opacity" : this . origOpacity } ) ;
661661
You can’t perform that action at this time.
0 commit comments