Skip to content

Commit c77f844

Browse files
author
Vic
committed
Build seem to fail without $timeouts
Re-added.
1 parent e9e9c33 commit c77f844

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ui-scroll.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ angular.module('ui.scroll', [])
333333
let updates = updateDOM();
334334

335335
// We need the item bindings to be processed before we can do adjustment
336-
$scope.$applyAsync(() => {
336+
$scope.$applyAsync(() => $timeout(() => {
337337

338338
// show elements after data binging has been done
339339
updates.inserted.forEach(w => w.element.removeClass('ng-hide'));
@@ -349,14 +349,14 @@ angular.module('ui.scroll', [])
349349
if (!pending.length) {
350350
adapter.calculateProperties();
351351
}
352-
});
352+
}));
353353
}
354354

355355
function adjustBufferAfterFetch(rid) {
356356
let updates = updateDOM();
357357

358358
// We need the item bindings to be processed before we can do adjustment
359-
$scope.$applyAsync(() => {
359+
$scope.$applyAsync(() => $timeout(() => {
360360
// show elements after data binging has been done
361361
updates.inserted.forEach(w => w.element.removeClass('ng-hide'));
362362
updates.prepended.forEach(w => w.element.removeClass('ng-hide'));
@@ -378,7 +378,7 @@ angular.module('ui.scroll', [])
378378
bindEvents();
379379
adapter.calculateProperties();
380380
}
381-
});
381+
}));
382382
}
383383

384384
function fetch(rid) {

0 commit comments

Comments
 (0)