mirror of https://github.com/vuejs/core.git
fix(compat): ensure proper handling of render fuction from SFC using Vue.extend (#7781)
close #7766
This commit is contained in:
parent
36bd9b0a1f
commit
c73847f2be
|
@ -18,6 +18,15 @@ export function convertLegacyComponent(
|
||||||
|
|
||||||
// 2.x constructor
|
// 2.x constructor
|
||||||
if (isFunction(comp) && comp.cid) {
|
if (isFunction(comp) && comp.cid) {
|
||||||
|
// #7766
|
||||||
|
if (comp.render) {
|
||||||
|
// only necessary when compiled from SFC
|
||||||
|
comp.options.render = comp.render
|
||||||
|
}
|
||||||
|
// copy over internal properties set by the SFC compiler
|
||||||
|
comp.options.__file = comp.__file
|
||||||
|
comp.options.__hmrId = comp.__hmrId
|
||||||
|
comp.options.__scopeId = comp.__scopeId
|
||||||
comp = comp.options
|
comp = comp.options
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue