[fix] check for parent_component before accessing root

pull/6646/head
Henrik Giesel 5 years ago
parent b1621d697d
commit 9fd553a32b

@ -130,7 +130,7 @@ export function init(component, options, instance, create_fragment, not_equal, p
callbacks: blank_object(),
dirty,
skip_bound: false,
root: options.target || parent_component.$$.root
root: options.target || (parent_component ? parent_component.$$.root : document)
};
append_styles && append_styles($$.root);

Loading…
Cancel
Save