Skip to content

Commit 451778b

Browse files
committed
speed up is-pt-index-valid check
1 parent 261387d commit 451778b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ lib.tagSelected = function(calcTrace, trace, ptNumber2cdIndex) {
495495
}
496496

497497
function isPtIndexValid(v) {
498-
return lib.validate(v, {valType: 'integer', min: 0});
498+
return isNumeric(v) && v >= 0 && v % 1 === 0;
499499
}
500500

501501
function isCdIndexValid(v) {

0 commit comments

Comments
 (0)