Unverified Commit d30f27ad authored by Robert Knight's avatar Robert Knight Committed by GitHub

Merge pull request #1006 from hypothesis/replace-q-references

Replace a usage of AngularJS promises ($q)
parents a3c6dd46 ec0e043b
......@@ -21,7 +21,6 @@ const CACHE_TTL = 5 * 60 * 1000; // 5 minutes
* @ngInject
*/
function session(
$q,
$rootScope,
analytics,
store,
......@@ -148,7 +147,7 @@ function session(
.catch(function(err) {
flash.error('Log out failed');
analytics.track(analytics.events.LOGOUT_FAILURE);
return $q.reject(new Error(err));
throw new Error(err);
})
.then(function() {
analytics.track(analytics.events.LOGOUT_SUCCESS);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment