diff --git a/src/compile/utils/scope.ts b/src/compile/utils/scope.ts index d4427c44ff38..20cca46cba3e 100644 --- a/src/compile/utils/scope.ts +++ b/src/compile/utils/scope.ts @@ -106,7 +106,7 @@ export function extract_names(param: Node) { export function extract_identifiers(param: Node) { const nodes: Node[] = []; - extractors[param.type](nodes, param); + extractors[param.type] && extractors[param.type](nodes, param); return nodes; } diff --git a/test/runtime/samples/reactive-value-mutate/_config.js b/test/runtime/samples/reactive-value-mutate/_config.js new file mode 100644 index 000000000000..e40881683408 --- /dev/null +++ b/test/runtime/samples/reactive-value-mutate/_config.js @@ -0,0 +1,3 @@ +export default { + html: `{"bar":42}` +}; diff --git a/test/runtime/samples/reactive-value-mutate/main.svelte b/test/runtime/samples/reactive-value-mutate/main.svelte new file mode 100644 index 000000000000..59fc5b7eb5e1 --- /dev/null +++ b/test/runtime/samples/reactive-value-mutate/main.svelte @@ -0,0 +1,7 @@ + + +{JSON.stringify(foo)}