diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2013-12-20 23:02:29 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2013-12-20 23:02:29 +0100 |
commit | 13f9849a68bf9d58d30d6dc876d854fbd2df4586 (patch) | |
tree | 70f50a7b637cc93367a1220571f1bd6afcc8495a | |
parent | 0dbcbb6f8b0b89776c24d000840192571e39edbf (diff) |
debug
-rw-r--r-- | js/app/services/persistence.coffee | 4 | ||||
-rw-r--r-- | js/public/app.js | 4 | ||||
-rw-r--r-- | js/tests/services/persistenceSpec.coffee | 6 |
3 files changed, 8 insertions, 6 deletions
diff --git a/js/app/services/persistence.coffee b/js/app/services/persistence.coffee index 1c7ed9351..a8ecb660b 100644 --- a/js/app/services/persistence.coffee +++ b/js/app/services/persistence.coffee @@ -84,11 +84,11 @@ $rootScope, $q) -> do (lastChange, offset) => successCallbackWrapper = (data) => console.log data - console.log data.items + console.log data.data.items console.log offset console.log lastChange console.log @_lastFeedChange - if data.items.length == 0 && + if data.data.items.length == 0 && lastChange == @_lastFeedChange && offset != 0 @_preventUselessAutoPageRequest = true diff --git a/js/public/app.js b/js/public/app.js index 85044751e..2533ea6c1 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -2786,11 +2786,11 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. (function(lastChange, offset) { return successCallbackWrapper = function(data) { console.log(data); - console.log(data.items); + console.log(data.data.items); console.log(offset); console.log(lastChange); console.log(_this._lastFeedChange); - if (data.items.length === 0 && lastChange === _this._lastFeedChange && offset !== 0) { + if (data.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 06bdd73ea..fd84a1757 100644 --- a/js/tests/services/persistenceSpec.coffee +++ b/js/tests/services/persistenceSpec.coffee @@ -76,7 +76,8 @@ describe 'Persistence', -> it 'should reset the autopage lock when loading a new feed', => data = - items: [] + data: + items: [] called = 0 @req.get.andCallFake (route, params) -> params.onSuccess(data) @@ -93,7 +94,8 @@ describe 'Persistence', -> xit 'should not send autopage request if reqeust returned nothing', => data = - items: [] + data: + items: [] called = 0 @req.get.andCallFake (route, params) -> params.onSuccess(data) |