Upgrade lazy loaded elements before setting config (#5944)

This commit is contained in:
Bram Kragten 2020-05-20 16:23:50 +02:00
parent 9be864b45e
commit 339221e793

View File

@ -126,6 +126,7 @@ const _lazyCreate = <T extends keyof CreateElementConfigTypes>(
) as CreateElementConfigTypes[T]["element"];
customElements.whenDefined(tag).then(() => {
try {
customElements.upgrade(element);
// @ts-ignore
element.setConfig(config);
} catch (err) {