Save top-level draft change comments in localstorage Unsaved diff comment drafts are automatically backed-up in local-storage if the user discards them on accident or navigates away without saving them. This change extends the same functionality to change-level comments and adds tests accordingly. Bug: Issue 4258 Change-Id: Iecfdecfc10cd92f798f1f7306af994b6ec8f74db
diff --git a/polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js b/polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js index a2afb89..ff41a74 100644 --- a/polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js +++ b/polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js
@@ -58,7 +58,7 @@ _getDraftKey: function(location) { return ['draft', location.changeNum, location.patchNum, location.path, - location.line].join(':'); + location.line || ''].join(':'); }, _cleanupDrafts: function() {