diff --git a/src/helpers/prevent-utils.js b/src/helpers/prevent-utils.js index ee662a8d..1d0f0645 100644 --- a/src/helpers/prevent-utils.js +++ b/src/helpers/prevent-utils.js @@ -4,6 +4,7 @@ import { isValidMatchNumber, isValidMatchStr, } from './string-utils'; +import { nativeIsNaN } from './number-utils'; /** * Checks whether the passed arg is proper callback @@ -27,7 +28,7 @@ export const isValidCallback = (callback) => { */ export const parseRawDelay = (delay) => { const parsedDelay = Math.floor(Number(delay)); - return typeof parsedDelay === 'number' ? parsedDelay : delay; + return typeof parsedDelay === 'number' && nativeIsNaN(parsedDelay) ? parsedDelay : delay; }; /**