vuejs / devtools-v6

⚙️ Browser devtools extension for debugging Vue.js applications.
https://devtools-v6.vuejs.org/
MIT License
24.68k stars 4.14k forks source link

fix(backend): ensure currentAppRecord is defined when backend handli… #2070

Closed dO-ob94 closed 9 months ago

dO-ob94 commented 1 year ago

…ng components events emitted from Vue. (fix #1770)

Description

I have noticed that there are some issues caused by the reason that currentAppRecord is not defined (but it is used when some hooks such as COMPONENT_ADDED are called). Typical issues are #1770 and #1711. And there is good case analysis.

I had same issue when I developed a Micro Frontends project which contains both Vue2 and Vue3 app instance. And I found that selectApp function is almost a synchronous function. So I just change the order of code execution in createAppRecord function then errors disappeared.

@yyx990803 吐槽一下,这个二十几k星项目的文档还有很大的提升空间。

Additional context


What is the purpose of this pull request?

Before submitting the PR, please make sure you do the following