Skip to content

Commit

Permalink
[fix] check for parent_component before accessing root
Browse files Browse the repository at this point in the history
  • Loading branch information
hgiesel committed Aug 13, 2021
1 parent b1621d6 commit 9fd553a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/internal/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9fd553a

Please sign in to comment.