Commit c17f6a2b authored by Randall Leeds's avatar Randall Leeds

Check for drafts when logging out

parent 72d8cc50
......@@ -41,8 +41,11 @@ class App
$scope.$watch 'auth.persona', (newValue, oldValue) =>
if oldValue? and not newValue?
# TODO: better knowledge of routes
authentication.$logout => $scope.$broadcast '$reset'
if annotator.discardDrafts()
# TODO: better knowledge of routes
authentication.$logout => $scope.$broadcast '$reset'
else
$scope.auth.persona = oldValue
else if newValue?
$scope.sheet.collapsed = true
......
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