Skip to content

Commit 809bcd2

Browse files
committed
what a great codebase (sarcastic bt dubs)
1 parent 0be44c2 commit 809bcd2

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/lib/hash-parser-hoc.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const HashParserHOC = function (WrappedComponent) {
3737
window.removeEventListener('hashchange', this.handleHashChange);
3838
}
3939
handleHashChange () {
40-
const hashMatch = window.location.hash.match(/#(\d+)/);
40+
const hashMatch = window.location.hash.match(/#(.+)/);
4141
const hashProjectId = hashMatch === null ? defaultProjectId : hashMatch[1];
4242
this.props.setProjectId(hashProjectId.toString());
4343
}

src/lib/tw-state-manager-hoc.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const getLocalStorage = key => {
6666
};
6767

6868
const readHashProjectId = () => {
69-
const match = location.hash.match(/#(\d+)/);
69+
const match = location.hash.match(/#(.+)/);
7070
return match === null ? null : match[1];
7171
};
7272

src/playground/embed.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const getProjectId = () => {
1616
// For compatibility reasons, we first look at the hash.
1717
// eg. https://turbowarp.org/embed.html#1
1818
const hashMatch = location.hash.match(/#(.+)/);
19+
console.log(hashMatch);
1920
if (hashMatch !== null) {
2021
return hashMatch[1];
2122
}

0 commit comments

Comments
 (0)