From eeeeb4998689df9cd61a3c0f279eb8e312d99304 Mon Sep 17 00:00:00 2001 From: pushkine Date: Fri, 29 Jan 2021 17:51:30 +0100 Subject: [PATCH] inline `prop_values` in `init` helper (#5909) --- src/runtime/internal/Component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/runtime/internal/Component.ts b/src/runtime/internal/Component.ts index c503a507ff..6d211dfedd 100644 --- a/src/runtime/internal/Component.ts +++ b/src/runtime/internal/Component.ts @@ -100,8 +100,6 @@ export function init(component, options, instance, create_fragment, not_equal, p const parent_component = current_component; set_current_component(component); - const prop_values = options.props || {}; - const $$: T$$ = component.$$ = { fragment: null, ctx: null, @@ -128,7 +126,7 @@ export function init(component, options, instance, create_fragment, not_equal, p let ready = false; $$.ctx = instance - ? instance(component, prop_values, (i, ret, ...rest) => { + ? instance(component, options.props || {}, (i, ret, ...rest) => { const value = rest.length ? rest[0] : ret; if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value);