From 9243c43d2d1f13d3bbff0faea2d1de44681b88d8 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 14 Nov 2025 04:11:45 +0000 Subject: [PATCH] fix(obsidian): pass string elementId instead of number to editObsidianNote The editObsidianNote function expects elementId as a string (e.g. 'burg123') but was receiving a number. This caused elementId.replace() to fail. Fixed in both: - burg-editor.js: Pass 'burg' + id instead of id - markers-editor.js: Pass id (already a string) instead of marker.i --- index.html | 4 ++-- modules/ui/burg-editor.js | 2 +- modules/ui/markers-editor.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 9a7bc578..1a7b2bd0 100644 --- a/index.html +++ b/index.html @@ -8254,7 +8254,7 @@ - + @@ -8269,7 +8269,7 @@ - + diff --git a/modules/ui/burg-editor.js b/modules/ui/burg-editor.js index cc331342..25576f33 100644 --- a/modules/ui/burg-editor.js +++ b/modules/ui/burg-editor.js @@ -492,7 +492,7 @@ function editBurg(id) { // Use Obsidian integration if available, otherwise fall back to old notes system if (typeof editObsidianNote !== "undefined") { const coordinates = {x: burg.x, y: burg.y}; - editObsidianNote(id, "burg", coordinates); + editObsidianNote("burg" + id, "burg", coordinates); } else { const name = elSelected.text(); editNotes("burg" + id, name); diff --git a/modules/ui/markers-editor.js b/modules/ui/markers-editor.js index 30bdd90b..fbcf6407 100644 --- a/modules/ui/markers-editor.js +++ b/modules/ui/markers-editor.js @@ -225,7 +225,7 @@ function editMarker(markerI) { // Use Obsidian integration if available, otherwise fall back to old notes system if (typeof editObsidianNote !== "undefined" && marker) { const coordinates = {x: marker.x, y: marker.y}; - editObsidianNote(marker.i, "marker", coordinates); + editObsidianNote(id, "marker", coordinates); } else { editNotes(id, id); }