Artur Arseniev
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
8 additions and
3 deletions
-
packages/core/src/dom_components/model/Components.ts
|
|
@ -63,15 +63,20 @@ const getComponentsFromDefs = ( |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Here `result` might be a Component
|
|
|
|
|
|
const cmp = isFunction(result.components) ? (result as unknown as Component) : null; |
|
|
|
|
|
|
|
|
if (components) { |
|
|
if (components) { |
|
|
const newComponents = getComponentsFromDefs(components, all, opts); |
|
|
const newComponents = getComponentsFromDefs(components, all, opts); |
|
|
|
|
|
|
|
|
if (isFunction(result.components)) { |
|
|
if (cmp) { |
|
|
const cmps = result.components(); |
|
|
cmp.components().reset(newComponents, opts); |
|
|
cmps.length > 0 && cmps.reset(newComponents, opts); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
result.components = newComponents; |
|
|
result.components = newComponents; |
|
|
} |
|
|
} |
|
|
|
|
|
} else if (cmp) { |
|
|
|
|
|
// The component already exists but the parsed one is without components
|
|
|
|
|
|
cmp.components().reset([], opts); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return result; |
|
|
return result; |
|
|
|