check to make sure scrollPosition is defined
This commit is contained in:
parent
c2ef0bacc7
commit
f4bd7ea570
1 changed files with 8 additions and 1 deletions
|
|
@ -237,7 +237,14 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
var prevPos;
|
||||
|
||||
function getScrollPosition() {
|
||||
var pos = $ionicScrollDelegate.getScrollPosition().top;
|
||||
var scrollPosition = $ionicScrollDelegate.getScrollPosition();
|
||||
if (!scrollPosition) {
|
||||
$window.requestAnimationFrame(function() {
|
||||
getScrollPosition();
|
||||
});
|
||||
return;
|
||||
}
|
||||
var pos = scrollPosition.top;
|
||||
if (pos === prevPos) {
|
||||
$window.requestAnimationFrame(function() {
|
||||
getScrollPosition();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue