@@ -1927,21 +1927,23 @@ axes.draw = function(gd, arg, opts) {
1927
1927
fullLayout . _paper . selectAll ( 'g.subplot' ) . each ( function ( d ) {
1928
1928
var id = d [ 0 ] ;
1929
1929
var plotinfo = fullLayout . _plots [ id ] ;
1930
- var xa = plotinfo . xaxis ;
1931
- var ya = plotinfo . yaxis ;
1932
-
1933
- plotinfo . xaxislayer . selectAll ( '.' + xa . _id + 'tick' ) . remove ( ) ;
1934
- plotinfo . yaxislayer . selectAll ( '.' + ya . _id + 'tick' ) . remove ( ) ;
1935
- plotinfo . xaxislayer . selectAll ( '.' + xa . _id + 'tick2' ) . remove ( ) ;
1936
- plotinfo . yaxislayer . selectAll ( '.' + ya . _id + 'tick2' ) . remove ( ) ;
1937
- plotinfo . xaxislayer . selectAll ( '.' + xa . _id + 'divider' ) . remove ( ) ;
1938
- plotinfo . yaxislayer . selectAll ( '.' + ya . _id + 'divider' ) . remove ( ) ;
1939
-
1940
- if ( plotinfo . gridlayer ) plotinfo . gridlayer . selectAll ( 'path' ) . remove ( ) ;
1941
- if ( plotinfo . zerolinelayer ) plotinfo . zerolinelayer . selectAll ( 'path' ) . remove ( ) ;
1942
-
1943
- fullLayout . _infolayer . select ( '.g-' + xa . _id + 'title' ) . remove ( ) ;
1944
- fullLayout . _infolayer . select ( '.g-' + ya . _id + 'title' ) . remove ( ) ;
1930
+ if ( plotinfo ) {
1931
+ var xa = plotinfo . xaxis ;
1932
+ var ya = plotinfo . yaxis ;
1933
+
1934
+ plotinfo . xaxislayer . selectAll ( '.' + xa . _id + 'tick' ) . remove ( ) ;
1935
+ plotinfo . yaxislayer . selectAll ( '.' + ya . _id + 'tick' ) . remove ( ) ;
1936
+ plotinfo . xaxislayer . selectAll ( '.' + xa . _id + 'tick2' ) . remove ( ) ;
1937
+ plotinfo . yaxislayer . selectAll ( '.' + ya . _id + 'tick2' ) . remove ( ) ;
1938
+ plotinfo . xaxislayer . selectAll ( '.' + xa . _id + 'divider' ) . remove ( ) ;
1939
+ plotinfo . yaxislayer . selectAll ( '.' + ya . _id + 'divider' ) . remove ( ) ;
1940
+
1941
+ if ( plotinfo . gridlayer ) plotinfo . gridlayer . selectAll ( 'path' ) . remove ( ) ;
1942
+ if ( plotinfo . zerolinelayer ) plotinfo . zerolinelayer . selectAll ( 'path' ) . remove ( ) ;
1943
+
1944
+ fullLayout . _infolayer . select ( '.g-' + xa . _id + 'title' ) . remove ( ) ;
1945
+ fullLayout . _infolayer . select ( '.g-' + ya . _id + 'title' ) . remove ( ) ;
1946
+ }
1945
1947
} ) ;
1946
1948
}
1947
1949
0 commit comments