From 881e44fbb692b283ec3d4bbf596ce06f4bd12fc6 Mon Sep 17 00:00:00 2001 From: Arik Fraimovich Date: Thu, 10 Apr 2014 15:10:39 +0300 Subject: [PATCH] Fix: access query after it's assigned --- rd_ui/app/scripts/controllers/query_view.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rd_ui/app/scripts/controllers/query_view.js b/rd_ui/app/scripts/controllers/query_view.js index 46e0fd902..b957905ee 100644 --- a/rd_ui/app/scripts/controllers/query_view.js +++ b/rd_ui/app/scripts/controllers/query_view.js @@ -4,9 +4,8 @@ function QueryViewCtrl($scope, Events, $route, $location, notifications, growl, Query, DataSource) { var DEFAULT_TAB = 'table'; - Events.record(currentUser, 'view', 'query', $scope.query.id); - $scope.query = $route.current.locals.query; + Events.record(currentUser, 'view', 'query', $scope.query.id); $scope.queryResult = $scope.query.getQueryResult(); $scope.queryExecuting = false;