Skip to content

Commit

Permalink
fix(core): 修复每次页面加载都要删除core监听队列的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
enncy committed Dec 31, 2022
1 parent 9b2e086 commit 230d43a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/core/src/interfaces/cors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ export class CorsEventEmitter {
if (originId) {
resolve(originId);
} else {
// 清空未处理的事件
setValue(key, '');

// 添加 models 监听队列
const id = addConfigChangeListener(key, async (pre, curr, remote) => {
if (remote) {
Expand Down Expand Up @@ -125,7 +122,7 @@ export class CorsEventEmitter {
}

if (typeof GM_listValues !== 'undefined') {
// 离开页面后
// 加载页面后
window.onload = () => {
// 删除全部未处理的模态框临时变量,以及监听队列
listValues().forEach((key) => {
Expand Down

0 comments on commit 230d43a

Please sign in to comment.