Commit ec0e043b authored by Robert Knight's avatar Robert Knight

Replace a usage of AngularJS promises ($q)

This is part of replacing all uses of AngularJS promises with native
promises.

Part of #972
parent 92eb7d0b
......@@ -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