summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-04-06 15:26:45 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-04-06 15:26:58 +0200
commitdbd18a20993221baf9e851fbd8eba1a48c411b3d (patch)
treed6bb96ddde1d70e960e1e8fc7b3d2d8a1ce3ca79 /js
parent3c4044970e38820d67560e219dd94dc9e96b0387 (diff)
get rid of deprecated getParams and renderJSON method to ease transition to built in appframework
Diffstat (limited to 'js')
-rw-r--r--js/app/services/persistence.coffee2
-rw-r--r--js/public/app.js2
-rw-r--r--js/tests/services/persistenceSpec.coffee3
3 files changed, 3 insertions, 4 deletions
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 <http://www.gnu.org/licenses/>.
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)