Skip to content

Commit

Permalink
Use URL() instead of string ops
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed Feb 1, 2024
1 parent af9c3de commit c7195fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/structure/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class Document extends Svue {
return [id, slug].join("-");
},
canonicalUrl(slugId) {
return `${APP_URL}documents/${slugId}`;
return new URL(`documents/${slugId}`, APP_URL).toString();
},
pageHashUrl() {
return (page) => `#document/p${page}`;
Expand Down

0 comments on commit c7195fc

Please sign in to comment.