From 94116abaf0a0d6f69469d87d26f594bc2fb27caf Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Thu, 24 Jun 2021 18:58:31 +1000 Subject: [PATCH] Fix error in db upgrade --- src/upgrade.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/upgrade.js b/src/upgrade.js index f7d3b99..abfe97d 100644 --- a/src/upgrade.js +++ b/src/upgrade.js @@ -633,6 +633,9 @@ export const versions = { .toCollection() .modify((state) => { for (let id in state.tokens) { + if (!state.tokens[id]) { + continue; + } if (!state.tokens[id].tokenId.startsWith("__default")) { const token = tokens.find( (token) => token.id === state.tokens[id].tokenId