Skip to content

Commit

Permalink
fix: 修复保活模式下路由参数丢失的问题 (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
yiludege authored Dec 12, 2022
1 parent fb8c20e commit ffd2d60
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/wujie-core/src/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,10 @@ export default class Wujie {

/** 保活模式和使用proxyLocation.href跳转链接都不应该销毁shadow */
public unmount(): void {
// 清理子应用过期的同步参数,降级时调用需要等iframe完全销毁再clear
this.degrade ? setTimeout(() => clearInactiveAppUrl()) : clearInactiveAppUrl();
// 清理子应用过期的同步参数
// 非降级时如果子应用共用一个无界需要异步清理
// 降级时调用需要等iframe完全销毁再clear
setTimeout(() => clearInactiveAppUrl());
if (this.alive) {
this.lifecycles?.deactivated?.(this.iframe.contentWindow);
}
Expand Down

0 comments on commit ffd2d60

Please sign in to comment.