Skip to content

Commit b798c86

Browse files
committed
Call first reload with $timeout
1 parent 00c67d3 commit b798c86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ui-scroll.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ angular.module('ui.scroll', [])
9999
buffer.first = origin;
100100
buffer.next = origin;
101101
buffer.minIndex = Number.MAX_VALUE;
102-
return buffer.maxIndex = Number.MIN_VALUE;
102+
buffer.maxIndex = Number.MIN_VALUE;
103103
}
104104

105105
angular.extend(buffer, {
@@ -566,7 +566,7 @@ angular.module('ui.scroll', [])
566566
viewport.bind('scroll', resizeAndScrollHandler);
567567
viewport.bind('mousewheel', wheelHandler);
568568

569-
$scope.$watch(datasource.revision, () => reload());
569+
$timeout(() => reload());
570570

571571
$scope.$on('$destroy', () => {
572572
// clear the buffer. It is necessary to remove the elements and $destroy the scopes

0 commit comments

Comments
 (0)