Skip to content

Commit d64b8c3

Browse files
committed
client updates
1 parent 3c7420c commit d64b8c3

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

client/package-lock.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/src/components/pages/reader-page.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,9 @@ export class ReaderPage extends LitElement {
625625
private async loadBookFromRoute() {
626626
console.log("📖 ReaderPage: Loading book from route");
627627

628-
// Extract book ID from URL path like /reader/1
629-
const pathParts = window.location.pathname.split("/");
628+
// Extract book ID from hash like #reader/1
629+
const hash = window.location.hash.slice(1); // Remove the leading #
630+
const pathParts = hash.split("/");
630631
const bookIdStr = pathParts[pathParts.length - 1];
631632
const bookId = parseInt(bookIdStr, 10);
632633

0 commit comments

Comments
 (0)