Skip to content

Commit c5f9257

Browse files
committed
fix(shadow): ensure es5 build checks shadowRoot
1 parent b6fb871 commit c5f9257

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

src/core/host-snapshot.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,7 @@ export const initHostSnapshot = (domApi: d.DomApi, cmpMeta: d.ComponentMeta, hos
3636
// but this browser doesn't support it
3737
// so let's polyfill a few things for the user
3838

39-
if (_BUILD_.isDev && _BUILD_.clientSide) {
40-
// it's possible we're manually forcing the slot polyfill
41-
// but this browser may already support the read-only shadowRoot
42-
// do an extra check here, but only for dev mode on the client
43-
if (!('shadowRoot' in HTMLElement.prototype)) {
44-
(hostElm as any).shadowRoot = hostElm;
45-
}
46-
47-
} else {
39+
if (!('shadowRoot' in HTMLElement.prototype)) {
4840
(hostElm as any).shadowRoot = hostElm;
4941
}
5042
}

0 commit comments

Comments
 (0)