Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7701c9d

Browse files
authored
Correct check for undefined variable
The code was comparing the result of `typeof` with a variable named `undefined`. As typeof returns a string it should compare to `'undefined'`
1 parent c04fbb3 commit 7701c9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/traces/scatterternary/calc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ module.exports = function calc(gd, trace) {
9191
calcColorscale(trace);
9292

9393
// this has migrated up from arraysToCalcdata as we have a reference to 's' here
94-
if(typeof s !== undefined) Lib.mergeArray(s, cd, 'ms');
94+
if(typeof s !== 'undefined') Lib.mergeArray(s, cd, 'ms');
9595

9696
return cd;
9797
};

0 commit comments

Comments
 (0)