diff --git a/app/assets/javascripts/app/controllers/editor.js b/app/assets/javascripts/app/controllers/editor.js index 5a1650829..e040a8535 100644 --- a/app/assets/javascripts/app/controllers/editor.js +++ b/app/assets/javascripts/app/controllers/editor.js @@ -373,6 +373,11 @@ angular.module('app') } this.deleteNote = function() { + if(this.note.locked) { + alert("This note is locked. If you'd like to delete it, unlock it, and try again."); + return; + } + let title = this.note.safeTitle().length ? `'${this.note.title}'` : "this note"; if(confirm(`Are you sure you want to delete ${title}?`)) { this.remove()(this.note);