[fix] prefer context from constructor options

pull/6759/head
Conduitry 5 years ago
parent 58c13db4b0
commit fecc15fc8b

@ -124,7 +124,7 @@ export function init(component, options, instance, create_fragment, not_equal, p
on_disconnect: [], on_disconnect: [],
before_update: [], before_update: [],
after_update: [], after_update: [],
context: new Map(parent_component ? parent_component.$$.context : options.context || []), context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
// everything else // everything else
callbacks: blank_object(), callbacks: blank_object(),

Loading…
Cancel
Save