From 995ed23b3ef4d726e0cdcb12fb5ff4f69d548595 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 31 Aug 2021 08:43:39 +0200 Subject: [PATCH] tell TS we're certain to have a txn --- src/matrix/storage/idb/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/storage/idb/utils.ts b/src/matrix/storage/idb/utils.ts index 76c4d1ed..bd1683ea 100644 --- a/src/matrix/storage/idb/utils.ts +++ b/src/matrix/storage/idb/utils.ts @@ -74,7 +74,7 @@ export function openDatabase(name: string, createObjectStore: CreateObjectStore, req.onupgradeneeded = async (ev : IDBVersionChangeEvent) => { const req = ev.target as IDBRequest; const db = req.result; - const txn = req.transaction; + const txn = req.transaction!; const oldVersion = ev.oldVersion; try { await createObjectStore(db, txn, oldVersion, version);