Skip to content

Commit

Permalink
fix: 修复子应用location.origin为主应用地址问题 (#194)
Browse files Browse the repository at this point in the history
close #193
  • Loading branch information
yiludege authored Sep 29, 2022
1 parent a95f9ec commit ed5c518
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/wujie-core/src/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,13 @@ export function proxyGenerator(
{
get: function (_fakeLocation, propKey) {
const location = iframe.contentWindow.location;
if (propKey === "host" || propKey === "hostname" || propKey === "protocol" || propKey === "port") {
if (
propKey === "host" ||
propKey === "hostname" ||
propKey === "protocol" ||
propKey === "port" ||
propKey === "origin"
) {
return urlElement[propKey];
}
if (propKey === "href") {
Expand Down

0 comments on commit ed5c518

Please sign in to comment.