Skip to content

Commit 547ab93

Browse files
authored
fix: props with dash #9964 (#9993)
* fix member call * format
1 parent 2b8440c commit 547ab93

File tree

1 file changed

+2
-1
lines changed
  • packages/svelte/src/compiler/phases/3-transform/client

1 file changed

+2
-1
lines changed

packages/svelte/src/compiler/phases/3-transform/client/utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ export function serialize_get_binding(node, state) {
8282
}
8383

8484
if (binding.prop_alias) {
85-
return b.member(b.id('$$props'), b.id(binding.prop_alias));
85+
const key = b.key(binding.prop_alias);
86+
return b.member(b.id('$$props'), key, key.type === 'Literal');
8687
}
8788
return b.member(b.id('$$props'), node);
8889
}

0 commit comments

Comments
 (0)