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

fix(runtime-core): consist with vue2's error capturing behavior #2289

Merged
merged 3 commits into from
Oct 5, 2020

Conversation

unbyte
Copy link
Contributor

@unbyte unbyte commented Oct 2, 2020

close #2267

@@ -113,7 +113,9 @@ export function handleError(
const errorCapturedHooks = cur.ec
if (errorCapturedHooks) {
for (let i = 0; i < errorCapturedHooks.length; i++) {
if (errorCapturedHooks[i](err, exposedInstance, errorInfo)) {
if (
errorCapturedHooks[i](err, exposedInstance, errorInfo) === false
Copy link
Member

Choose a reason for hiding this comment

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

!errorCapturedHooks[i](err, exposedInstance, errorInfo) is better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

false !== falsy values, and vue 2 uses === false

@yyx990803 yyx990803 merged commit 4d20ac8 into vuejs:master Oct 5, 2020
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.

errorCaptured reverse behavior
3 participants