Commit d52868f1 authored by Randall Leeds's avatar Randall Leeds

Avoid a race condition with session-based auth

Don't send a new search request until the logout request has returned.
parent ccbb67be
......@@ -74,12 +74,14 @@ class App
else
$scope.reloadAnnotations()
else if oldValue?
authentication.$logout => $scope.$broadcast '$reset'
authentication.$logout =>
$scope.$broadcast '$reset'
if annotator.tool isnt 'comment'
annotator.setTool 'comment'
else
$scope.reloadAnnotations()
if annotator.tool isnt 'comment'
annotator.setTool 'comment'
else
$scope.reloadAnnotations()
$scope.$watch 'socialView.name', (newValue, oldValue) ->
return if newValue is oldValue
......
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