File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -110,14 +110,7 @@ export const initializeComponent = async (
110110 // wait for the CustomElementRegistry to mark the component as ready before setting `isWatchReady`. Otherwise,
111111 // watchers may fire prematurely if `customElements.get()`/`customElements.whenDefined()` resolves _before_
112112 // Stencil has completed instantiating the component.
113- // customElements.whenDefined always returns the answer asynchronously (and slower than a queueMicrotask).
114- // Checking !!customElements.get(cmpTag) instead is synchronous.
115- const setWatchIsReady = ( ) => ( hostRef . $flags$ |= HOST_FLAGS . isWatchReady ) ;
116- if ( ! ! customElements . get ( cmpTag ) ) {
117- setWatchIsReady ( ) ;
118- } else {
119- customElements . whenDefined ( cmpTag ) . then ( setWatchIsReady ) ;
120- }
113+ customElements . whenDefined ( cmpTag ) . then ( ( ) => ( hostRef . $flags$ |= HOST_FLAGS . isWatchReady ) ) ;
121114 }
122115
123116 if ( BUILD . style && Cstr && Cstr . style ) {
You can’t perform that action at this time.
0 commit comments