fix(core): use partial renderOptions in SlotMixin (for Safari)

This commit is contained in:
Thijs Louisse 2022-06-07 22:38:13 +02:00 committed by Thijs Louisse
parent 040c5b58c0
commit 5ad98a26fa
2 changed files with 8 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'@lion/core': patch
---
fix: use partial renderOptions in SlotMixin (for Safari)

View file

@ -44,7 +44,9 @@ const SlotMixinImplementation = superclass =>
const registryRoot = supportsScopedRegistry ? this.shadowRoot : document;
// @ts-expect-error wait for browser support
const tempRenderTarget = registryRoot.createElement('div');
render(template, tempRenderTarget, this.renderOptions);
// Providing all options breaks Safari; keep host and creationScope
const { creationScope, host } = this.renderOptions;
render(template, tempRenderTarget, { creationScope, host });
return Array.from(tempRenderTarget.childNodes);
}