From 11b11412b697a8779b48168bedd3ff0bcfff64a5 Mon Sep 17 00:00:00 2001 From: scottashton Date: Wed, 5 Mar 2014 11:20:55 +0100 Subject: [PATCH] fixed bug jan discovered --- js/apps/system/aardvark/frontend/js/routers/router.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/apps/system/aardvark/frontend/js/routers/router.js b/js/apps/system/aardvark/frontend/js/routers/router.js index 8637bd57c6..f0b91debc6 100644 --- a/js/apps/system/aardvark/frontend/js/routers/router.js +++ b/js/apps/system/aardvark/frontend/js/routers/router.js @@ -42,8 +42,10 @@ this.bind('all', function(trigger, args) { var routeData = trigger.split(":"); if (trigger === "route") { - if (this.currentRoute === "dashboard") { + if (this.currentRoute === "dashboard" && this.dashboardView) { this.dashboardView.stopUpdating(); + } else if (args === "dashboard") { + delete this.dashboardView; } this.currentRoute = args; } @@ -347,7 +349,8 @@ this.dashboardView = new dashboardView({ collection: this.statisticsCollection, description: this.statisticsDescription, - documentStore: window.arangoDocumentsStore + documentStore: window.arangoDocumentsStore, + dygrpahConfig : window.dygraphConfig }); } this.dashboardView.render();