Commit cadfe3fd authored by Robert Knight's avatar Robert Knight

Tidy up some JS that was generated by CoffeeScript -> JS conversion

parent cd7cf039
...@@ -123,11 +123,9 @@ module.exports = function AppController( ...@@ -123,11 +123,9 @@ module.exports = function AppController(
if (!promptToLogout()) { if (!promptToLogout()) {
return; return;
} }
var iterable = drafts.unsaved(); drafts.unsaved().forEach(function (draft) {
for (var i = 0, draft; i < iterable.length; i++) { $rootScope.$emit(events.ANNOTATION_DELETED, draft);
draft = iterable[i]; });
$rootScope.$emit("annotationDeleted", draft);
}
drafts.discard(); drafts.discard();
$scope.accountDialog.visible = false; $scope.accountDialog.visible = false;
return auth.logout(); return auth.logout();
......
'use strict';
/** /**
* The drafts service provides temporary storage for unsaved edits to new or * The drafts service provides temporary storage for unsaved edits to new or
* existing annotations. * existing annotations.
......
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