diff --git a/src/components/Gam.tsx b/src/components/Gam.tsx index 1920903c..99a89887 100644 --- a/src/components/Gam.tsx +++ b/src/components/Gam.tsx @@ -61,6 +61,7 @@ export const GamScripts = () => ( // Add global error handler to suppress Publift Fuse cross-origin errors // These errors occur in iOS Safari due to strict Same-Origin Policy enforcement // when the ad viewability script tries to access parent window properties + // Also suppress race condition errors during navigation (function() { var originalErrorHandler = window.onerror; window.onerror = function(message, source, lineno, colno, error) { @@ -69,15 +70,18 @@ export const GamScripts = () => ( source && ( source.includes('/media/native/') || source.includes('fuse.js') || - source.includes('fuseplatform.net') + source.includes('fuseplatform.net') || + source.includes('/nobid/blocking_script.js') ) && ( (message && typeof message === 'string' && ( message.includes('contextWindow.parent') || - message.includes('null is not an object') + message.includes('null is not an object') || + message.includes('is not a function') )) || (error && error.message && ( error.message.includes('contextWindow.parent') || - error.message.includes('null is not an object') + error.message.includes('null is not an object') || + error.message.includes('is not a function') )) ) ) {