From 274b99d8c64cd9c42536a771965993d85f84ca7b Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Sun, 19 Jul 2026 11:43:48 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Carlos Fernandez --- module/applications/ui/chatLog.mjs | 4 +--- module/data/action/attackAction.mjs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/module/applications/ui/chatLog.mjs b/module/applications/ui/chatLog.mjs index 35a4a966..02846400 100644 --- a/module/applications/ui/chatLog.mjs +++ b/module/applications/ui/chatLog.mjs @@ -282,8 +282,6 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo async onRollReloadCheck(_event, messageData) { const message = game.messages.get(messageData._id); const needReload = await message.system.action.handleReload?.({ awaitRoll: true }); - await message.update({ - 'system.needReload': needReload - }); + await message.update({ 'system.needReload': needReload }); } } diff --git a/module/data/action/attackAction.mjs b/module/data/action/attackAction.mjs index 934cbbae..1922140c 100644 --- a/module/data/action/attackAction.mjs +++ b/module/data/action/attackAction.mjs @@ -53,7 +53,7 @@ export default class DHAttackAction extends DHDamageAction { async use(event, options) { if (this.item?.system.needsReload) { - return ui.notifications.error(game.i18n.format('DAGGERHEART.UI.Notifications.reloadRequired', { weapon: this.item.name })); + return ui.notifications.error(_loc('DAGGERHEART.UI.Notifications.reloadRequired', { weapon: this.item.name })); } const result = await super.use(event, options);