From e208c1852e24b71bdf6155049a948ca78bddfbd8 Mon Sep 17 00:00:00 2001 From: Lucian Date: Thu, 6 Apr 2017 20:19:23 +0200 Subject: [PATCH] fix(statblock-import): Log end of command correctly. --- lib/modules/monster-manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/modules/monster-manager.js b/lib/modules/monster-manager.js index 6adfc2f..512f7b8 100644 --- a/lib/modules/monster-manager.js +++ b/lib/modules/monster-manager.js @@ -154,7 +154,7 @@ module.exports = class MonsterManager extends ShapedModule { importStatblock(options) { this.logger.info('Importing statblocks for tokens $$$', options.selected.graphic); - _.each(options.selected.graphic, (token) => { + return Promise.all(options.selected.graphic.map((token) => { const error = `Could not find GM notes on either selected token ${token.get('name')} or the character ` + 'it represents. Have you pasted it in correctly?'; const text = token.get('gmnotes'); @@ -174,7 +174,7 @@ module.exports = class MonsterManager extends ShapedModule { } return this.processGMNotes(options, token, text); - }); + })); } processGMNotes(options, token, text) {