Skip to content

Commit

Permalink
inline prop_values in init helper (#5909)
Browse files Browse the repository at this point in the history
  • Loading branch information
pushkine authored Jan 29, 2021
1 parent 47baa19 commit eeeeb49
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/runtime/internal/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
Expand Down

0 comments on commit eeeeb49

Please sign in to comment.