From 3a6ce5b5e111c4c62be451038e8b729c1352d3ae Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Thu, 10 Jul 2014 22:41:11 -0700 Subject: [PATCH] forgot to stop the angular interval after changing path --- server/app/scripts/controllers/sync.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/app/scripts/controllers/sync.js b/server/app/scripts/controllers/sync.js index c4e927ed4..c6f9815dd 100644 --- a/server/app/scripts/controllers/sync.js +++ b/server/app/scripts/controllers/sync.js @@ -1,10 +1,10 @@ 'use strict'; angular.module('app').controller("SyncController", function($scope, $http, $interval, $location, users) { - $interval(function() { + var stop = $interval(function() { // todo(bradrydzewski) We should poll the user to see - // if the sync process is complete. If no, we should - // repeat. + // if the sync process is complete. + $interval.cancel(stop); $location.path("/"); }, 5000); });