Skip to content

Commit

Permalink
fix(test): 解决 setUrlwindow.location 缺少属性
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed May 31, 2022
1 parent 3f2bcc3 commit aeca4c0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,17 @@ export function setUrl(path) {

delete window.location;
window.location = {
pathname: url.pathname,
hash: url.hash,
host: url.host,
hostname: url.hostname,
href: url.href,
origin: url.origin,
pathname: url.pathname,
port: url.port,
protocol: url.protocol,
search: url.search,
reload: () => {},
reload: () => {
},
};
}

Expand Down

0 comments on commit aeca4c0

Please sign in to comment.