Skip to content

Commit

Permalink
fix(operator): correct check for number types
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTelanie committed Apr 27, 2021
1 parent 96741bf commit 65dbc3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/operator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// @ts-nocheck
import { isNumber } from './utils/math';

const X = 0;
const Y = 1;
const Z = 2;
Expand Down Expand Up @@ -27,7 +29,7 @@ function handleProgess(progess, alg, resVec) {

const res = alg(resVec);

if (typeof res !== 'number') {
if (!isNumber(res)) {
throw new Error(`
your assigned progress did not not return a primitive!
calc() does not support logical operators (|| && ==) directly
Expand Down

0 comments on commit 65dbc3c

Please sign in to comment.