mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-24 03:55:09 +01:00
a IDBRequest when opening the database does not have a source
This commit is contained in:
parent
2ef7251079
commit
3a064d6796
@ -33,10 +33,10 @@ export class IDBError extends StorageError {
|
|||||||
storeName: string;
|
storeName: string;
|
||||||
databaseName: string;
|
databaseName: string;
|
||||||
|
|
||||||
constructor(message: string, sourceOrCursor: IDBIndex | IDBCursor | IDBObjectStore, cause: DOMException | null = null) {
|
constructor(message: string, sourceOrCursor: IDBIndex | IDBCursor | IDBObjectStore | null, cause: DOMException | null = null) {
|
||||||
const source = "source" in sourceOrCursor ? sourceOrCursor.source : sourceOrCursor;
|
const source = (sourceOrCursor && "source" in sourceOrCursor) ? sourceOrCursor.source : sourceOrCursor;
|
||||||
const storeName = _sourceName(source);
|
const storeName = source ? _sourceName(source) : "";
|
||||||
const databaseName = _sourceDatabase(source);
|
const databaseName = source ? _sourceDatabase(source) : "";
|
||||||
let fullMessage = `${message} on ${databaseName}.${storeName}`;
|
let fullMessage = `${message} on ${databaseName}.${storeName}`;
|
||||||
if (cause) {
|
if (cause) {
|
||||||
fullMessage += ": ";
|
fullMessage += ": ";
|
||||||
|
Loading…
Reference in New Issue
Block a user