Skip to content

Commit b82e182

Browse files
committed
more fixes
1 parent f2ce6f4 commit b82e182

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ export function ObjectExpression(node, context) {
1515
* @type {Array<{rune: NonNullable<ReturnType<typeof get_rune>>, property: Property & {value: CallExpression}}>}
1616
*/
1717
let reactive_properties = [];
18+
let valid_property_runes = ['$state', '$derived', '$state.raw', '$derived.by'];
1819
for (let property of node.properties) {
1920
if (property.type !== 'Property') continue;
2021
const rune = get_rune(property.value, context.state.scope);
21-
if (rune) {
22+
if (rune && valid_property_runes.includes(rune)) {
2223
has_runes = true;
2324
reactive_properties.push({
2425
rune,

0 commit comments

Comments
 (0)