From 115355ab7bbc2c7ba1ca13cf7dce5fc3d27b48ae Mon Sep 17 00:00:00 2001 From: BrokenEagle Date: Fri, 14 Feb 2020 20:24:27 +0000 Subject: [PATCH] Fix dialogue text for new notes It was showing "Editing note #xx" and so on for all new notes past the first initial new note. --- app/javascript/src/javascripts/notes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/src/javascripts/notes.js b/app/javascript/src/javascripts/notes.js index f0825a09d..0c67e6d5c 100644 --- a/app/javascript/src/javascripts/notes.js +++ b/app/javascript/src/javascripts/notes.js @@ -601,7 +601,7 @@ let Note = { } let $dialog = $('
'); - let note_title = (id === 'x' ? 'Creating new note' : 'Editing note #' + id); + let note_title = (typeof id === 'string' && id.startsWith('x') ? 'Creating new note' : 'Editing note #' + id); $dialog.append('' + note_title + ' (view help)'); $dialog.append($textarea); $dialog.data("id", id);