We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46866ef commit 143b344Copy full SHA for 143b344
packages/core/src/history.ts
@@ -21,11 +21,17 @@ export class History {
21
}
22
23
public static pushState(page: Page): void {
24
- window.history.pushState(page, '', page.url)
+ window.history.pushState(this.pageData(page), '', page.url)
25
26
27
public static replaceState(page: Page): void {
28
- window.history.replaceState(page, '', page.url)
+ window.history.replaceState(this.pageData(page), '', page.url)
29
+ }
30
+
31
+ protected static pageData(page: Page): Omit<Page, 'meta'> {
32
+ const { meta, ...remaining } = page
33
34
+ return remaining
35
36
37
public static setState(key: string, value: any) {
0 commit comments