[#36] Fix incorrect variable reference.

This commit is contained in:
fyorl 2021-12-21 14:15:39 +00:00
parent 57f7c67272
commit e8aa4a462e
No known key found for this signature in database
GPG key ID: 3A4E57DAE36AC3C4
2 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@
export async function createWorldbuildingMacro(data, slot) {
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 === item.label) && (m.command === command));
let macro = game.macros.find(m => (m.name === data.label) && (m.command === command));
if (!macro) {
macro = await Macro.create({
name: data.label,