mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Ignore more failure states of startViewTransition (#35951)
GitOrigin-RevId: e5aac40612550ea42abdc4d93e80045018670137
This commit is contained in:
@@ -119,8 +119,13 @@ export default class PDFJSWrapper {
|
||||
const transition = container.startViewTransition(setDocument)
|
||||
|
||||
transition.ready.catch(err => {
|
||||
// ignore InvalidStateError, it just means the document was hidden
|
||||
if (err?.name !== 'InvalidStateError') {
|
||||
const ignored = [
|
||||
'InvalidStateError', // the document was hidden, or the viewport was resized
|
||||
'AbortError', // another transition started
|
||||
'TimeoutError', // setDocument blocked for too long
|
||||
]
|
||||
|
||||
if (!ignored.includes(err?.name)) {
|
||||
captureException(err, {
|
||||
tags: { handler: 'pdf-preview' },
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user