We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d515ee commit 8150b3cCopy full SHA for 8150b3c
1 file changed
lib/storage/errors.ts
@@ -29,7 +29,7 @@ const StorageErrorClass = {
29
* provider's classifier so they all extract the error the same way.
30
*/
31
function getErrorParts(error: unknown): {name: string; message: string} {
32
- if (error instanceof Error || error instanceof DOMException) {
+ if (error instanceof Error || (typeof DOMException !== 'undefined' && error instanceof DOMException)) {
33
return {name: (error.name ?? '').toLowerCase(), message: (error.message ?? '').toLowerCase()};
34
}
35
return {name: '', message: String(error ?? '').toLowerCase()};
0 commit comments