fix(client/print): read note ID properly from note path

This commit is contained in:
Elian Doran 2025-10-19 15:38:10 +03:00
parent 44b9c6e0f6
commit 89dac52f49
No known key found for this signature in database

View File

@ -4,7 +4,10 @@ import { CustomNoteList } from "./widgets/collections/NoteList";
import "./print.css"; import "./print.css";
async function main() { async function main() {
const noteId = window.location.pathname.split("/")[2]; const notePath = window.location.hash.substring(1);
const noteId = notePath.split("/").at(-1);
if (!noteId) return;
const froca = (await import("./services/froca")).default; const froca = (await import("./services/froca")).default;
const note = await froca.getNote(noteId); const note = await froca.getNote(noteId);