From 80a8139eaad97e4ebc3dd69acf76514f4256fca4 Mon Sep 17 00:00:00 2001 From: Azmoria <65363489+Azmoria@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:59:32 -0400 Subject: [PATCH] Internal - adjust setting localstorage to persist --- Token.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Token.js b/Token.js index bbb4ebb0e..d6367dba9 100644 --- a/Token.js +++ b/Token.js @@ -476,7 +476,7 @@ class Token { delete window.all_token_objects[id]; if (id in window.JOURNAL.notes) { delete window.JOURNAL.notes[id]; - localStorage.setItem('Journal' + window.gameId, JSON.stringify(window.JOURNAL.notes)); + window.JOURNAL.persist(); } } @@ -4584,7 +4584,7 @@ function paste_selected_tokens(x, y) { window.JOURNAL.notes[newId] = structuredClone(window.JOURNAL.notes[id]); let copiedNote = window.JOURNAL.notes[newId]; copiedNote.title = window.TOKEN_OBJECTS[id].options.name; - localStorage.setItem('Journal' + window.gameId, JSON.stringify(window.JOURNAL.notes)); + window.JOURNAL.persist(); window.MB.sendMessage('custom/myVTT/note',{ id: newId, note:copiedNote