From 1978a2e4c7f730fd1f42f50ca76fe78df7991102 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Fri, 26 Mar 2021 11:18:14 +0200 Subject: [PATCH] Fixed Error when referencing slotLevel in a spell --- app/imports/api/creature/actions/castSpellWithSlot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/imports/api/creature/actions/castSpellWithSlot.js b/app/imports/api/creature/actions/castSpellWithSlot.js index 06349477..1a84e84c 100644 --- a/app/imports/api/creature/actions/castSpellWithSlot.js +++ b/app/imports/api/creature/actions/castSpellWithSlot.js @@ -65,7 +65,7 @@ const castSpellWithSlot = new ValidatedMethod({ action: spell, context: {slotLevel}, creature, - targets: [target], + targets: target ? [target] : [], method: this, }); // Note this only recomputes the top-level creature, not the nearest one