Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/components/Gam.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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')
))
)
) {
Expand Down
Loading