diff --git a/src/compiler/compile/index.ts b/src/compiler/compile/index.ts index 12b161aeeb..24fe2b06c0 100644 --- a/src/compiler/compile/index.ts +++ b/src/compiler/compile/index.ts @@ -1,4 +1,3 @@ -import { assign } from '../../runtime/internal/utils'; import Stats from '../Stats'; import parse from '../parse/index'; import render_dom from './render_dom/index'; @@ -68,7 +67,7 @@ function validate_options(options: CompileOptions, warnings: Warning[]) { } export default function compile(source: string, options: CompileOptions = {}) { - options = assign({ generate: 'dom', dev: false }, options); + options = { generate: 'dom', dev: false, ...options }; const stats = new Stats(); const warnings = []; diff --git a/src/compiler/compile/render_dom/index.ts b/src/compiler/compile/render_dom/index.ts index dbcd2e83d2..d5523a830f 100644 --- a/src/compiler/compile/render_dom/index.ts +++ b/src/compiler/compile/render_dom/index.ts @@ -267,7 +267,7 @@ export default function dom( const insert = (reassigned || export_name) ? b`${`$$subscribe_${name}`}()` - : b`$$self.$$.on_destroy.push(@subscribe(${name}, #value => {$$invalidate(${i}, (${value} = #value));})`; + : b`$$self.$$.on_destroy.push(@subscribe(${name}, #value => {$$invalidate(${i}, ${value} = #value);}))`; if (component.compile_options.dev) { return b`@validate_store(${name}, '${name}'); ${insert}`;