Skip to content

Commit ad90e06

Browse files
committed
Fixed callback from being executed when disabled was defined and is true, and promise is null.
1 parent 3e3d04b commit ad90e06

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@ This was copy-pasted from [```ReactJS```'s contribution style guide](https://git
306306

307307
## Changelogs
308308

309+
- Fixed callback from being executed when ```disabled``` was defined and is true, and promise is null.
310+
309311
#### v0.1.4
310312

311313
- Fixed conditions on cancelling the callback from being called (technically fixes horizontal scrolling from triggering the callback).

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-srph-infinite-scroll",
3-
"version": "0.1.4",
3+
"version": "0.1.5",
44
"homepage": "https://github.com/srph/angular-infinite-scroll",
55
"authors": [
66
"srph <seraphipod@gmail.com>"

dist/angular-srph-infinite-scroll.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@
6262
// Halt the execution if the disabled flag is set and true
6363
// or if the execution is still running
6464
var disabled = scope.disabled;
65-
if ( ( promise !== null && (!angular.isUndefined(disabled) && !!disabled) )
65+
if ( (!angular.isUndefined(disabled) && !!disabled)
66+
|| promise !== null
6667
|| _last_scroll == scroll) {
6768
return;
6869
}

dist/angular-srph-infinite-scroll.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/directive.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@
6262
// Halt the execution if the disabled flag is set and true
6363
// or if the execution is still running
6464
var disabled = scope.disabled;
65-
if ( ( promise !== null && (!angular.isUndefined(disabled) && !!disabled) )
65+
if ( (!angular.isUndefined(disabled) && !!disabled)
66+
|| promise !== null
6667
|| _last_scroll == scroll) {
6768
return;
6869
}

0 commit comments

Comments
 (0)