Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: again load source fail should catch error #97

Merged
merged 4 commits into from
Oct 10, 2023

Conversation

qiYuei
Copy link
Contributor

@qiYuei qiYuei commented Sep 21, 2023

Copy link
Owner

@kuitos kuitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -246,6 +246,9 @@ export function execScripts(entry, scripts, proxy = window, opts = {}) {
}

return new Promise(resolve => schedule(0, success || resolve));
}).catch((e) => {
error();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里 catch 的话 getExternalScripts 那里就不要再 catch 了,不然 error callback 会被调用两次

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确实. Done!

src/index.js Outdated
errorCallback();
throw e;
}));
}))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直接删了就行,包括入参及调用那里的代码

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

src/index.js Outdated Show resolved Hide resolved
Copy link
Owner

@kuitos kuitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kuitos kuitos merged commit 1b9fa8b into kuitos:master Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

qiankun劫持的资源首次加载失败后,后续加载都不会触发资源的 error事件
2 participants