inline `prop_values` in `init` helper (#5909)

pull/5958/head
pushkine 5 years ago committed by GitHub
parent 47baa1965d
commit eeeeb49986
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);

Loading…
Cancel
Save