@@ -63,7 +63,7 @@ plots.hasSimpleAPICommandBindings = commandModule.hasSimpleAPICommandBindings;
63
63
plots . findSubplotIds = function findSubplotIds ( data , type ) {
64
64
var subplotIds = [ ] ;
65
65
66
- if ( plots . subplotsRegistry [ type ] === undefined ) return subplotIds ;
66
+ if ( ! plots . subplotsRegistry [ type ] ) return subplotIds ;
67
67
68
68
var attr = plots . subplotsRegistry [ type ] . attr ;
69
69
@@ -90,7 +90,7 @@ plots.findSubplotIds = function findSubplotIds(data, type) {
90
90
plots . getSubplotIds = function getSubplotIds ( layout , type ) {
91
91
var _module = plots . subplotsRegistry [ type ] ;
92
92
93
- if ( _module === undefined ) return [ ] ;
93
+ if ( ! _module ) return [ ] ;
94
94
95
95
// layout must be 'fullLayout' here
96
96
if ( type === 'cartesian' && ( ! layout . _has || ! layout . _has ( 'cartesian' ) ) ) return [ ] ;
@@ -131,7 +131,7 @@ plots.getSubplotIds = function getSubplotIds(layout, type) {
131
131
*
132
132
*/
133
133
plots . getSubplotData = function getSubplotData ( data , type , subplotId ) {
134
- if ( plots . subplotsRegistry [ type ] === undefined ) return [ ] ;
134
+ if ( ! plots . subplotsRegistry [ type ] ) return [ ] ;
135
135
136
136
var attr = plots . subplotsRegistry [ type ] . attr ,
137
137
subplotData = [ ] ,
@@ -167,7 +167,7 @@ plots.getSubplotData = function getSubplotData(data, type, subplotId) {
167
167
* @return {array } array of calcdata traces
168
168
*/
169
169
plots . getSubplotCalcData = function ( calcData , type , subplotId ) {
170
- if ( plots . subplotsRegistry [ type ] === undefined ) return [ ] ;
170
+ if ( ! plots . subplotsRegistry [ type ] ) return [ ] ;
171
171
172
172
var attr = plots . subplotsRegistry [ type ] . attr ;
173
173
var subplotCalcData = [ ] ;
0 commit comments