mirror of
https://github.com/zadam/trilium.git
synced 2026-03-07 00:58:09 +01:00
fix(canvas): saving on start due to mismatch in version number
This commit is contained in:
parent
a51a831fe8
commit
dba985b308
@ -52,7 +52,6 @@ export default function useCanvasPersistence(note: FNote, noteContext: NoteConte
|
|||||||
|
|
||||||
libraryCache.current = [];
|
libraryCache.current = [];
|
||||||
attachmentMetadata.current = [];
|
attachmentMetadata.current = [];
|
||||||
currentSceneVersion.current = -1;
|
|
||||||
|
|
||||||
// load saved content into excalidraw canvas
|
// load saved content into excalidraw canvas
|
||||||
let content: CanvasContent = {
|
let content: CanvasContent = {
|
||||||
@ -70,6 +69,9 @@ export default function useCanvasPersistence(note: FNote, noteContext: NoteConte
|
|||||||
|
|
||||||
loadData(api, content, theme);
|
loadData(api, content, theme);
|
||||||
|
|
||||||
|
// Initialize tracking state after loading to prevent redundant updates from initial onChange events
|
||||||
|
currentSceneVersion.current = getSceneVersion(api.getSceneElements());
|
||||||
|
|
||||||
// load the library state
|
// load the library state
|
||||||
loadLibrary(note).then(({ libraryItems, metadata }) => {
|
loadLibrary(note).then(({ libraryItems, metadata }) => {
|
||||||
// Update the library and save to independent variables
|
// Update the library and save to independent variables
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user