From 247cfcfc7c49b3fc3546c4d940ffc08e56965077 Mon Sep 17 00:00:00 2001 From: Kiho Date: Tue, 15 May 2018 21:29:46 -0700 Subject: [PATCH] Don't set null to switch_instance_changes --- src/compile/nodes/Component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compile/nodes/Component.ts b/src/compile/nodes/Component.ts index 06c461cae93b..5fd91bf4849a 100644 --- a/src/compile/nodes/Component.ts +++ b/src/compile/nodes/Component.ts @@ -207,9 +207,9 @@ export default class Component extends Node { const conditions = [...allDependencies].map(dep => `changed.${dep}`).join(' || '); updates.push(deindent` - var ${name_changes} = ${allDependencies.size === 1 ? `${conditions}` : `(${conditions})`} && @getSpreadUpdate(${levels}, [ + var ${name_changes} = ${allDependencies.size === 1 ? `${conditions}` : `(${conditions})`} ? @getSpreadUpdate(${levels}, [ ${changes.join(',\n')} - ]); + ]) : ${name_changes}; `); } else { this.attributes