File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
test/source/tests/page-recipe Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,14 @@ export class OauthPageRecipe extends PageRecipe {
2121 }
2222 // Check if it's an Error object with a message property
2323 if ( e instanceof Error ) {
24- return e . message . includes ( 'Navigating frame was detached' ) ;
24+ return e . message . includes ( 'Navigating frame was detached' ) || e . message . includes ( 'frame was detached' ) ;
2525 }
26- // Fallback: convert to string and check (for non-Error objects)
27- const errorStr = e . toString ( ) ;
28- return errorStr . includes ( 'Navigating frame was detached' ) || errorStr . includes ( 'frame was detached' ) ;
26+ // Check if it's already a string
27+ if ( typeof e === 'string' ) {
28+ return e . includes ( 'Navigating frame was detached' ) || e . includes ( 'frame was detached' ) ;
29+ }
30+ // For other types, we can't reliably check - return false to be safe
31+ return false ;
2932 }
3033
3134 /**
You can’t perform that action at this time.
0 commit comments