fix(core): use partial renderOptions in SlotMixin (for Safari)
This commit is contained in:
parent
040c5b58c0
commit
5ad98a26fa
2 changed files with 8 additions and 1 deletions
5
.changeset/grumpy-donkeys-camp.md
Normal file
5
.changeset/grumpy-donkeys-camp.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@lion/core': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: use partial renderOptions in SlotMixin (for Safari)
|
||||||
|
|
@ -44,7 +44,9 @@ const SlotMixinImplementation = superclass =>
|
||||||
const registryRoot = supportsScopedRegistry ? this.shadowRoot : document;
|
const registryRoot = supportsScopedRegistry ? this.shadowRoot : document;
|
||||||
// @ts-expect-error wait for browser support
|
// @ts-expect-error wait for browser support
|
||||||
const tempRenderTarget = registryRoot.createElement('div');
|
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);
|
return Array.from(tempRenderTarget.childNodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue