Skip to content

Commit 3527886

Browse files
committed
chore: fix demo site
1 parent 26098c4 commit 3527886

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/.vitepress/theme/components/playground-block.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ export default {
141141
(typeof window !== "undefined" &&
142142
window.location.hash.slice(1)) ||
143143
""
144-
if (serializedString !== this.serializedString) {
144+
if (!serializedString && this.serializedString) {
145+
history.replaceState(null, "", `#${this.serializedString}`)
146+
} else if (serializedString !== this.serializedString) {
145147
const state = deserializeState(serializedString)
146148
this.code = state.code || DEFAULT_CODE
147149
this.rules =

0 commit comments

Comments
 (0)