8000 loop over basePlotModules in _has() · xiaoaiwhc/plotly.js@19d24bb · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 19d24bb

Browse files
committed
loop over basePlotModules in _has()
1 parent ec941a4 commit 19d24bb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/plots/plots.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -536,14 +536,14 @@ plots.supplyDefaults = function(gd) {
536536
};
537537

538538
// helper function to be bound to fullLayout to check
539-
// whether a certain plot type or layout categories is present on plot
539+
// whether a certain plot type is present on plot
540540
function hasPlotType(category) {
541-
var modules = this._modules || [];
541+
var basePlotModules = this._basePlotModules || [];
542542

543-
for(var i = 0; i < modules.length; i++) {
544-
var _module = modules[i];
543+
for(var i = 0; i < basePlotModules.length; i++) {
544+
var _module = basePlotModules[i];
545545

546-
if(_module.basePlotModule.name === category) return true;
546+
if(_module.name === category) return true;
547547
}
548548

549549
return false;

0 commit comments

Comments
 (0)
0