Skip to content

Commit 6604f93

Browse files
Merge pull request #3137 from ITK-Leantime/feature/prevent-ticket-description-autosave-bleedthrough-on-new-ticket
Prevent ticket autosave across new tickets
2 parents e463f6f + cff698c commit 6604f93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

public/assets/js/app/core/editors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ leantime.editorController = (function () {
214214

215215
var entityId = jQuery("input[name=id]").val();
216216

217-
if(entityId == undefined) {
217+
if(!entityId) {
218218
entityId = "new";
219219
}
220220

@@ -239,7 +239,7 @@ leantime.editorController = (function () {
239239
plugins : "autosave,imagetools,embed,autoresize,shortlink,checklist,bettertable,table,emoticons,autolink,image,lists,save,media,searchreplace,paste,directionality,fullscreen,noneditable,visualchars,advancedTemplate,advlist,codesample,mention,slashcommands,textpattern",
240240
toolbar : "bold italic strikethrough | formatselect forecolor | alignleft aligncenter alignright | link unlink image media embed emoticons | checklist bullist numlist | table | codesample | advancedTemplate | restoredraft",
241241
autosave_prefix: 'leantime-complexEditor-autosave-{path}{query}-{id}-'+projectId+'-'+entityId+'-',
242-
autosave_restore_when_empty: true,
242+
autosave_restore_when_empty: entityId !== "new",
243243
autosave_retention: '10m',
244244
browser_spellcheck: true,
245245
contextmenu: false,

0 commit comments

Comments
 (0)