Skip to content

Commit cece423

Browse files
turanskyintellij-monorepo-bot
authored andcommitted
[vue] WEB-60199 Use buildMap for components calculation
GitOrigin-RevId: 57992c3ae4a7fa5dd781a5d1355d654d523d11ce
1 parent b26ad69 commit cece423

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

vuejs/src/org/jetbrains/vuejs/model/source/VueCompositionContainer.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,14 @@ abstract class VueCompositionContainer() :
3232
abstract override val source: JSCallExpression
3333

3434
override val components: Map<String, VueComponent>
35-
get() = (delegate?.takeUnless { it is VueComponent }?.components ?: emptyMap()) + getEntitiesAnalysis().components
35+
get() = buildMap {
36+
val container = delegate?.takeUnless { it is VueComponent }
37+
if (container != null) {
38+
putAll(container.components)
39+
}
40+
41+
putAll(getEntitiesAnalysis().components)
42+
}
3643

3744
override val directives: Map<String, VueDirective>
3845
get() = (delegate?.directives ?: emptyMap()) + getEntitiesAnalysis().directives

0 commit comments

Comments
 (0)