summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-06-26 12:22:27 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-06-26 12:22:27 +0200
commit831893647be2b4bc0e118148ac23c1144c83de0b (patch)
tree2fb0cd6ebd288959ac292a7c13f2290b7bb67162 /js
parent501e29f71c5d863879eb67ed311549ee46e5a04b (diff)
fix js unit tests
Diffstat (limited to 'js')
-rw-r--r--js/build/app.js6
-rw-r--r--js/controller/NavigationController.js6
2 files changed, 8 insertions, 4 deletions
diff --git a/js/build/app.js b/js/build/app.js
index d3e5934b3..a3a749132 100644
--- a/js/build/app.js
+++ b/js/build/app.js
@@ -375,10 +375,12 @@ var $__build_47_app__ = function () {
return $route.current && $route.current.$$route.type === FEED_TYPE.STARRED;
};
this.isFolderActive = function (folderId) {
- return $route.current && $route.current.$$route.type === FEED_TYPE.FOLDER && $route.current.params.id === folderId + '';
+ var currentId = parseInt($route.current.params.id, 10);
+ return $route.current && $route.current.$$route.type === FEED_TYPE.FOLDER && currentId === folderId;
};
this.isFeedActive = function (feedId) {
- return $route.current && $route.current.$$route.type === FEED_TYPE.FEED && $route.current.params.id === feedId + '';
+ var currentId = parseInt($route.current.params.id, 10);
+ return $route.current && $route.current.$$route.type === FEED_TYPE.FEED && currentId === feedId;
};
this.isAddingFolder = function () {
return true;
diff --git a/js/controller/NavigationController.js b/js/controller/NavigationController.js
index 25fa6ddd1..a848a4b39 100644
--- a/js/controller/NavigationController.js
+++ b/js/controller/NavigationController.js
@@ -98,15 +98,17 @@ function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource,
};
this.isFolderActive = (folderId) => {
+ let currentId = parseInt($route.current.params.id, 10);
return $route.current &&
$route.current.$$route.type === FEED_TYPE.FOLDER &&
- $route.current.params.id === folderId + '';
+ currentId === folderId;
};
this.isFeedActive = (feedId) => {
+ let currentId = parseInt($route.current.params.id, 10);
return $route.current &&
$route.current.$$route.type === FEED_TYPE.FEED &&
- $route.current.params.id === feedId + '';
+ currentId === feedId;
};
// TBD