File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -368,7 +368,9 @@ const deepClone = async (host) => {
368368 const cloneNode = async ( node , parent , shadowRoot ) => {
369369 const walkTree = async ( nextn , nextp , innerShadowRoot ) => {
370370 while ( nextn ) {
371- await cloneNode ( nextn , nextp , innerShadowRoot ) ;
371+ try {
372+ await cloneNode ( nextn , nextp , innerShadowRoot ) ;
373+ } catch ( exp ) { }
372374
373375 // Fix missing element nodes.
374376 if (
@@ -467,6 +469,7 @@ const deepClone = async (host) => {
467469
468470const prepareScreenshotData = ( remote ) => {
469471 return new Promise ( async ( resolve , reject ) => {
472+ try {
470473 const styleTags = window . document . querySelectorAll ( 'style, link' ) ;
471474 for ( var i = 0 ; i < styleTags . length ; ++ i ) {
472475 styleTags [ i ] . setAttribute ( 'bb-styleid' , i ) ;
@@ -549,5 +552,9 @@ const prepareScreenshotData = (remote) => {
549552 isMobile : isMobile ( ) ,
550553 } ) ;
551554 } ) ;
555+ } catch ( exp ) {
556+ console . warn ( 'Gleap: Failed to capture screenshot' , exp ) ;
557+ resolve ( null ) ;
558+ }
552559 } ) ;
553560} ;
You can’t perform that action at this time.
0 commit comments