From bb812a2b811734c9f7627878507a0ee65892a369 Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 6 Oct 2020 06:38:21 -0700 Subject: [PATCH] oops, fix bug modeling pet with no items --- src/server/modeling.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/server/modeling.js b/src/server/modeling.js index a92127b..23422f0 100644 --- a/src/server/modeling.js +++ b/src/server/modeling.js @@ -240,6 +240,10 @@ async function saveSwfAssetModelingData(customPetData, context) { // the item. (We do this separately for pet states, so that we can get // the pet state ID first.) const itemAssetInserts = inserts.filter((i) => i.type === "object"); + if (itemAssetInserts.length === 0) { + return; + } + const qs = itemAssetInserts .map( (_) =>