fix(hmr): make hmr working with class components (#2144)
This commit is contained in:
@@ -17,7 +17,8 @@ import {
|
||||
Data,
|
||||
ConcreteComponent,
|
||||
ClassComponent,
|
||||
Component
|
||||
Component,
|
||||
isClassComponent
|
||||
} from './component'
|
||||
import { RawSlots } from './componentSlots'
|
||||
import { isProxy, Ref, toRaw, ReactiveFlags } from '@vue/reactivity'
|
||||
@@ -340,7 +341,7 @@ function _createVNode(
|
||||
}
|
||||
|
||||
// class component normalization.
|
||||
if (isFunction(type) && '__vccOpts' in type) {
|
||||
if (isClassComponent(type)) {
|
||||
type = type.__vccOpts
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user