From 312f8ab43a5f781817e9b899a938719699c197c8 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 4 Nov 2023 03:34:21 -0400 Subject: [PATCH] fix: correct handling of error code --- src/kernel.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/kernel.ts b/src/kernel.ts index cbeb3e9..65dc938 100644 --- a/src/kernel.ts +++ b/src/kernel.ts @@ -28,8 +28,11 @@ function testIndexedDBSupport() { request.onerror = function (event) { // Error occurred, reject the promise - // @ts-ignore - reject(new Error("IndexedDB test error: " + event?.target?.errorCode)); + + reject( + // @ts-ignore + new Error("IndexedDB test error: " + event?.target?.error?.code), + ); }; request.onsuccess = function (event) {