Skip to content

Commit e5c860a

Browse files
committed
simplify arg1 -> plotMethod logic
1 parent 072f028 commit e5c860a

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/plots/get_data.js

+6-9
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,12 @@ exports.getModuleCalcData = function(calcdata, arg1) {
5555
var remainingCalcData = [];
5656

5757
var plotMethod;
58-
if(arg1) {
59-
var typeOfArg1 = typeof arg1;
60-
if(typeOfArg1 === 'string') {
61-
plotMethod = Registry.getModule(arg1).plot;
62-
} else if(typeOfArg1 === 'function') {
63-
plotMethod = arg1;
64-
} else {
65-
plotMethod = arg1.plot;
66-
}
58+
if(typeof arg1 === 'string') {
59+
plotMethod = Registry.getModule(arg1).plot;
60+
} else if(typeof arg1 === 'function') {
61+
plotMethod = arg1;
62+
} else {
63+
plotMethod = arg1.plot;
6764
}
6865
if(!plotMethod) {
6966
return [moduleCalcData, calcdata];

0 commit comments

Comments
 (0)