Upgrade lazy loaded elements before setting config (#5944)

This commit is contained in:
Bram Kragten 2020-05-20 16:23:50 +02:00 committed by GitHub
parent 300c8d06c4
commit 28d26065e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

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) {