Skip to content

Commit 45e0a61

Browse files
7inspireChang
andauthored
fix(vue): Property _isVue not defined in Vue3 (#4461)
Co-authored-by: Chang <[email protected]>
1 parent 6958a7e commit 45e0a61

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/vue/src/components.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const formatComponentName = (vm?: ViewModel, includeFile?: boolean): stri
4747
};
4848

4949
export const generateComponentTrace = (vm?: ViewModel): string => {
50-
if (vm?._isVue && vm?.$parent) {
50+
if ((vm?._isVue || vm?.__isVue) && vm?.$parent) {
5151
const tree = [];
5252
let currentRecursiveSequence = 0;
5353
while (vm) {

packages/vue/src/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ export interface Vue {
1212
}
1313

1414
export type ViewModel = {
15-
_isVue: boolean;
15+
_isVue?: boolean;
16+
__isVue?: boolean;
1617
$root: ViewModel;
1718
$parent?: ViewModel;
1819
$props: { [key: string]: any };

0 commit comments

Comments
 (0)