mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
fix: fix history proxy
This commit is contained in:
parent
2261d12064
commit
5f70c1c0ac
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@ import { rewriteUrl } from "../../shared";
|
|||
import { UrlChangeEvent } from "../events";
|
||||
|
||||
export default function (client: ScramjetClient, self: typeof globalThis) {
|
||||
client.Proxy("history.pushState", {
|
||||
client.Proxy("History.prototype.pushState", {
|
||||
apply(ctx) {
|
||||
if (ctx.args[2]) ctx.args[2] = rewriteUrl(ctx.args[2], client.meta);
|
||||
ctx.call();
|
||||
|
@ -13,7 +13,7 @@ export default function (client: ScramjetClient, self: typeof globalThis) {
|
|||
},
|
||||
});
|
||||
|
||||
client.Proxy("history.replaceState", {
|
||||
client.Proxy("History.prototype.replaceState", {
|
||||
apply(ctx) {
|
||||
if (ctx.args[2]) ctx.args[2] = rewriteUrl(ctx.args[2], client.meta);
|
||||
ctx.call();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue