diff --git a/README.md b/README.md index cafc0e1..381895d 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ Example markup: ## History +* 0.9.3 Changed `Number.isNaN` to use `!angular.isNumber` instead (original function not available in all browsers yet) (see [#2](/../../issues/2)). * 0.9.2 Fixed error when not defining `when-not-visible` attributes and updated NG Docs (see [#1](/../../issues/1)). * 0.9.1 Removed (incorrectly) namespaced events, not supported in JQ-Lite. * 0.9.0 Fixed event unbinding when removing bound elements from the DOM. diff --git a/dist/angular-scroll-animate.js b/dist/angular-scroll-animate.js index b03d774..24978e8 100644 --- a/dist/angular-scroll-animate.js +++ b/dist/angular-scroll-animate.js @@ -89,7 +89,7 @@ angular.module('angular-scroll-animate', []).directive('whenVisible', ['$documen var delayPercent = parseFloat(scope.delayPercent); - if ((Number.isNaN(delayPercent)) || (delayPercent < 0 || delayPercent > 1)) { + if (!angular.isNumber(delayPercent) || (delayPercent < 0 || delayPercent > 1)) { throw new Error('Directive: angular-scroll-animate \'delay-percent\' attribute must be a decimal fraction between 0 and 1.'); } } diff --git a/src/angular-scroll-animate.js b/src/angular-scroll-animate.js index da58040..687d102 100644 --- a/src/angular-scroll-animate.js +++ b/src/angular-scroll-animate.js @@ -89,7 +89,7 @@ angular.module('angular-scroll-animate', []).directive('whenVisible', ['$documen var delayPercent = parseFloat(scope.delayPercent); - if ((Number.isNaN(delayPercent)) || (delayPercent < 0 || delayPercent > 1)) { + if (!angular.isNumber(delayPercent) || (delayPercent < 0 || delayPercent > 1)) { throw new Error('Directive: angular-scroll-animate \'delay-percent\' attribute must be a decimal fraction between 0 and 1.'); } }