Skip to content

Commit

Permalink
chore: fix demo site
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Apr 23, 2024
1 parent 26098c4 commit 3527886
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/.vitepress/theme/components/playground-block.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ export default {
(typeof window !== "undefined" &&
window.location.hash.slice(1)) ||
""
if (serializedString !== this.serializedString) {
if (!serializedString && this.serializedString) {
history.replaceState(null, "", `#${this.serializedString}`)
} else if (serializedString !== this.serializedString) {
const state = deserializeState(serializedString)
this.code = state.code || DEFAULT_CODE
this.rules =
Expand Down

0 comments on commit 3527886

Please sign in to comment.