From dbd18a20993221baf9e851fbd8eba1a48c411b3d Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sun, 6 Apr 2014 15:26:45 +0200 Subject: get rid of deprecated getParams and renderJSON method to ease transition to built in appframework --- js/app/services/persistence.coffee | 2 +- js/public/app.js | 2 +- js/tests/services/persistenceSpec.coffee | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/app/services/persistence.coffee b/js/app/services/persistence.coffee index a79dc1224..7aee915a2 100644 --- a/js/app/services/persistence.coffee +++ b/js/app/services/persistence.coffee @@ -82,7 +82,7 @@ $rootScope, $q) -> # back up last change value in closure so we can compare it properly do (lastChange, offset, loading, onSuccess) => successCallbackWrapper = (data) => - if data.data.items.length == 0 && + if data.items.length == 0 && lastChange == @_lastFeedChange && offset != 0 @_preventUselessAutoPageRequest = true diff --git a/js/public/app.js b/js/public/app.js index 5982ab587..1b393b81f 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -2842,7 +2842,7 @@ License along with this library. If not, see . lastChange = this._lastFeedChange; (function(lastChange, offset, loading, onSuccess) { return successCallbackWrapper = function(data) { - if (data.data.items.length === 0 && lastChange === _this._lastFeedChange && offset !== 0) { + if (data.items.length === 0 && lastChange === _this._lastFeedChange && offset !== 0) { _this._preventUselessAutoPageRequest = true; } onSuccess(data); diff --git a/js/tests/services/persistenceSpec.coffee b/js/tests/services/persistenceSpec.coffee index fd84a1757..707c1e2fa 100644 --- a/js/tests/services/persistenceSpec.coffee +++ b/js/tests/services/persistenceSpec.coffee @@ -76,8 +76,7 @@ describe 'Persistence', -> it 'should reset the autopage lock when loading a new feed', => data = - data: - items: [] + items: [] called = 0 @req.get.andCallFake (route, params) -> params.onSuccess(data) -- cgit v1.2.3