From 688ecf754eb064ea5b386dd054e91d4a7240eb6b Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Tue, 27 Mar 2018 12:54:19 -0700 Subject: [PATCH] fix methods + prototype assignment --- src/generators/dom/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/generators/dom/index.ts b/src/generators/dom/index.ts index 63778addb5..6f06ded60b 100644 --- a/src/generators/dom/index.ts +++ b/src/generators/dom/index.ts @@ -159,9 +159,9 @@ export default function dom( ? 'svelte/shared.js' : options.shared || ''; - const prototypeBase = - `${name}.prototype` + - (templateProperties.methods ? `, %methods` : ''); + let prototypeBase = `${name}.prototype`; + templateProperties.methods && (prototypeBase = `@assign(${prototypeBase}, %methods)`); + const proto = sharedPath ? `@proto` : deindent`