Skip to content

Commit ef96c43

Browse files
committed
fix implementation of decodeUrl in controller
1 parent 8d5cfa5 commit ef96c43

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/controller/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ export class ScramjetController {
9595

9696
decodeUrl(url: string | URL) {
9797
if (url instanceof URL) url = url.toString();
98+
const prefixed = location.origin + $scramjet.config.prefix;
9899

99-
return $scramjet.codec.decode(url);
100+
return $scramjet.codec.decode(url.slice(prefixed.length));
100101
}
101102

102103
async openIDB(): Promise<IDBDatabase> {

0 commit comments

Comments
 (0)