diff --git a/templates/Story.tsx b/templates/Story.tsx index 6609724..233361b 100644 --- a/templates/Story.tsx +++ b/templates/Story.tsx @@ -47,7 +47,7 @@ export default (props: PropsWithChildren) => { const currentURL = new URL( "https://voltpad.ruthenic.com" + props.currentHref ); - const chapterNum = currentURL.searchParams.get("chapter") ?? 0; + const chapterNum = Number(currentURL.searchParams.get("chapter") ?? 0); return ( @@ -103,7 +103,7 @@ export default (props: PropsWithChildren) => { {isChapter ? ( ) : ( @@ -113,7 +113,10 @@ export default (props: PropsWithChildren) => { props.story.chapters[0].partJSON.photoUrl ? ( ) : undefined ) : undefined} @@ -122,7 +125,7 @@ export default (props: PropsWithChildren) => { props.story.chapters[0].partJSON.videoId ? ( ) : undefined ) : undefined}