Fix: access query after it's assigned

This commit is contained in:
Arik Fraimovich
2014-04-10 15:10:39 +03:00
parent d7e1328fc0
commit 881e44fbb6

View File

@@ -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;