File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
2nd-gen/packages/swc/utils Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -59,10 +59,10 @@ export async function waitForStoryReady(
5959 await element . waitFor ( { state : 'visible' } ) ;
6060
6161 // Step 4: Wait for Web Component to be fully upgraded (has shadow root if applicable)
62- await element . evaluate ( ( el ) => {
62+ await element . evaluate ( async ( el ) => {
6363 // If it's a custom element, wait for it to be fully upgraded
6464 if ( el . tagName . includes ( '-' ) ) {
65- return customElements . whenDefined ( el . tagName . toLowerCase ( ) ) ;
65+ await customElements . whenDefined ( el . tagName . toLowerCase ( ) ) ;
6666 }
6767 } ) ;
6868
Original file line number Diff line number Diff line change @@ -59,10 +59,10 @@ export async function waitForStoryReady(
5959 await element . waitFor ( { state : 'visible' } ) ;
6060
6161 // Step 4: Wait for Web Component to be fully upgraded (has shadow root if applicable)
62- await element . evaluate ( ( el ) => {
62+ await element . evaluate ( async ( el ) => {
6363 // If it's a custom element, wait for it to be fully upgraded
6464 if ( el . tagName . includes ( '-' ) ) {
65- return customElements . whenDefined ( el . tagName . toLowerCase ( ) ) ;
65+ await customElements . whenDefined ( el . tagName . toLowerCase ( ) ) ;
6666 }
6767 } ) ;
6868
You can’t perform that action at this time.
0 commit comments