From 821ed2831be554a8760f1fb7706505d80c78cf32 Mon Sep 17 00:00:00 2001 From: Richard Knoll Date: Thu, 7 Nov 2024 15:05:18 -0800 Subject: [PATCH] fix a couple of exceptions seen in minecraft logs --- pxtlib/package.ts | 2 +- webapp/src/idbworkspace.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pxtlib/package.ts b/pxtlib/package.ts index 6a0d2d0d85e5..2680d1d7808c 100644 --- a/pxtlib/package.ts +++ b/pxtlib/package.ts @@ -1205,7 +1205,7 @@ namespace pxt { await this.loadAsync() opts.bannedCategories = this.resolveBannedCategories(); - pxt.debug(`building: ${this.sortedDeps().map(p => p.config.name).join(", ")}`) + pxt.debug(`building: ${this.sortedDeps().map(p => p.config?.name).join(", ")}`) let variants: string[] diff --git a/webapp/src/idbworkspace.ts b/webapp/src/idbworkspace.ts index c34dfd0f388e..3841887bedd2 100644 --- a/webapp/src/idbworkspace.ts +++ b/webapp/src/idbworkspace.ts @@ -110,6 +110,8 @@ async function migratePouchAsync() { // format is (prefix-)?tableName--id::rev-guid const docId: string = entry._doc_id_rev; + if (!docId) continue; + const revSeparatorIndex = docId.lastIndexOf("::"); const rev = parseInt(docId.substring(revSeparatorIndex + 2).split("-")[0]);