From db34d156af166cd6f2922fe8c4279e9706f187f3 Mon Sep 17 00:00:00 2001 From: fyorl Date: Thu, 13 Jan 2022 12:10:03 +0000 Subject: [PATCH] [#27] Do not throw an error when dropping an item onto a hotbar slot. --- module/macro.js | 1 + 1 file changed, 1 insertion(+) diff --git a/module/macro.js b/module/macro.js index 4f07cbf..067b580 100644 --- a/module/macro.js +++ b/module/macro.js @@ -6,6 +6,7 @@ * @returns {Promise} */ export async function createWorldbuildingMacro(data, slot) { + if ( !data.roll || !data.label ) return false; const command = `const roll = new Roll("${data.roll}", actor ? actor.getRollData() : {}); roll.toMessage({speaker, flavor: "${data.label}"});`; let macro = game.macros.find(m => (m.name === data.label) && (m.command === command));