diff --git a/js/angular/controller/refresherController.js b/js/angular/controller/refresherController.js index c1a0d5fa4..710b215c3 100644 --- a/js/angular/controller/refresherController.js +++ b/js/angular/controller/refresherController.js @@ -354,9 +354,24 @@ IonicModule var q = $scope.$onRefresh(); if (q && q.then) { - q['finally'](function() { - $scope.$broadcast('scroll.refreshComplete'); - }); + if (q['finally']) { + q['finally'](broadcastRefreshEnd); + } else { + q.then( + function(payload) { + broadcastRefreshEnd(); + return payload; + }, + function(error) { + broadcastRefreshEnd(); + throw error; + } + ); + } + } + + function broadcastRefreshEnd() { + $scope.$broadcast('scroll.refreshComplete'); } }