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 b30acea commit a1b4187Copy full SHA for a1b4187
src/constructorio-id.js
@@ -13,11 +13,15 @@
13
return true;
14
} catch (e) {
15
return (
16
- e instanceof DOMException &&
17
- e.name === 'QuotaExceededError' &&
18
- // acknowledge QuotaExceededError only if there's something already stored
19
- storage &&
20
- storage.length !== 0
+ DOMException
+ && e instanceof DOMException
+ && (e.name === 'QuotaExceededError'
+ || e.name === 'QUOTA_EXCEEDED_ERR'
+ || e.name === 'NS_ERROR_DOM_QUOTA_REACHED'
21
+ || e.toString().indexOf('QUOTA_EXCEEDED_ERR') !== -1
22
+ || e.toString().indexOf('QuotaExceededError') !== -1)
23
+ && storage
24
+ && storage.length !== 0
25
);
26
}
27
0 commit comments