Skip to content

Commit d93938b

Browse files
committed
remove call to isNaN
1 parent 28f1d0d commit d93938b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/jsexecute.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ runtimeFunctions.retire = `const retire = () => {
223223
thread.target.runtime.sequencer.retireThread(thread);
224224
}`;
225225

226-
runtimeFunctions.NaNToZero = `const NaNToZero = value => isNaN(value) ? 0 : value`;
226+
runtimeFunctions.NaNToZero = `const NaNToZero = value => value === value ? value : 0`;
227227

228228
/**
229229
* Scratch cast to boolean.

0 commit comments

Comments
 (0)