Skip to content

Commit 5260ae8

Browse files
committed
fix: correctly analyze <object.property> components
1 parent 2344b40 commit 5260ae8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/khaki-flies-remember.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: correctly analyze `<object.property>` components

packages/svelte/src/compiler/phases/scope.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ export function create_scopes(ast, root, allow_reactive_declarations, parent) {
10321032
},
10331033

10341034
Component: (node, context) => {
1035-
context.state.scope.reference(b.id(node.name), context.path);
1035+
context.state.scope.reference(b.id(node.name.split('.')[0]), context.path);
10361036
Component(node, context);
10371037
},
10381038
SvelteSelf: Component,

0 commit comments

Comments
 (0)