catch dom exception on unmount in qr scanner
This commit is contained in:
parent
8566644ea1
commit
5b14606b39
|
@ -274,7 +274,11 @@ function InvoiceScanner ({ fieldName }) {
|
|||
onClose()
|
||||
}}
|
||||
onError={(error) => {
|
||||
if (error instanceof DOMException) {
|
||||
console.log(error)
|
||||
} else {
|
||||
toaster.danger(error?.message || error?.toString?.())
|
||||
}
|
||||
}}
|
||||
/>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue