forked from mystiq/hydrogen-web
try more domexception fixes
This commit is contained in:
parent
5ecf0a6717
commit
325077bcb0
2 changed files with 6 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "brawl-chat",
|
"name": "brawl-chat",
|
||||||
"version": "0.0.7",
|
"version": "0.0.9",
|
||||||
"description": "A javascript matrix client prototype, trying to minize RAM usage by offloading as much as possible to IndexedDB",
|
"description": "A javascript matrix client prototype, trying to minize RAM usage by offloading as much as possible to IndexedDB",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
|
|
@ -17,8 +17,11 @@ export class StorageError extends Error {
|
||||||
let fullMessage = message;
|
let fullMessage = message;
|
||||||
if (cause) {
|
if (cause) {
|
||||||
fullMessage += ": ";
|
fullMessage += ": ";
|
||||||
if (cause.name) {
|
if (typeof cause.name === "string") {
|
||||||
fullMessage += `(${cause.name}) `;
|
fullMessage += `(name: ${cause.name}) `;
|
||||||
|
}
|
||||||
|
if (typeof cause.code === "number") {
|
||||||
|
fullMessage += `(code: ${cause.name}) `;
|
||||||
}
|
}
|
||||||
fullMessage += cause.message;
|
fullMessage += cause.message;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue