From 2b6e4dc9638719c105a827d651db62c8bea5a40d Mon Sep 17 00:00:00 2001 From: pushkine Date: Wed, 27 May 2020 23:07:39 +0200 Subject: [PATCH] fix --- src/compiler/compile/index.ts | 3 +-- src/compiler/compile/render_dom/index.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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}`;