Subscribe on changes!

errorHandler not used when hydrated, due to null instance

avatar
Sep 1st 2021

Version

3.2.6

Reproduction link

github.com

Steps to reproduce

Reproduction is a copy of https://github.com/vitejs/vite/tree/main/packages/playground/ssr-vue with additon of errorHandler to main.js, and button to Home.vue.

npm run dev Then click the Throw error button on home page.

What is expected?

The custom errorHandler gets called. Which logs 'no error here'

What is actually happening?

The error is logged to console.


Trying to set up Sentry.

Related to #1336

In callWithErrorHandling, instance is null.

Add breakpoint to createInvoker. Look back in the stack to hydrateElement. In hydrateElement, parentComponent is set, but not passed to patchProp