Unverified Commit ea87415f authored by Huzaifa Arif's avatar Huzaifa Arif Committed by GitHub

[Fix] Adds try/catch to gracefully handle performance observer exception (#35202)

* fix: add try/catch to gracefull handle performance observer exception on older browsers

* fix: run prettier
Co-authored-by: 's avatarSteven <steven@ceriously.com>
parent 0355e5f6
...@@ -516,7 +516,15 @@ export default function Image({ ...@@ -516,7 +516,15 @@ export default function Image({
} }
} }
}) })
perfObserver.observe({ type: 'largest-contentful-paint', buffered: true }) try {
perfObserver.observe({
type: 'largest-contentful-paint',
buffered: true,
})
} catch (err) {
// Log error but don't crash the app
console.error(err)
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment