Skip to content

Commit

Permalink
Improve error objects from IDB
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Sep 11, 2023
1 parent 56ada78 commit 3bee9d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src-renderer/migrate/migrate.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ <h1 class="title"></h1>
request.onsuccess = async () => {
try {
const result = request.result;
if (result === null || typeof result !== 'object') {
throw new Error(`IDB ${key} returned non-object: ${result}`);
}

const transfer = [];

for (const [key, value] of Object.entries(result)) {
Expand Down

0 comments on commit 3bee9d8

Please sign in to comment.