mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +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)
|
const transition = container.startViewTransition(setDocument)
|
||||||
|
|
||||||
transition.ready.catch(err => {
|
transition.ready.catch(err => {
|
||||||
// ignore InvalidStateError, it just means the document was hidden
|
const ignored = [
|
||||||
if (err?.name !== 'InvalidStateError') {
|
'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, {
|
captureException(err, {
|
||||||
tags: { handler: 'pdf-preview' },
|
tags: { handler: 'pdf-preview' },
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user