delete unneeded fn

return let because variable it overridden
This commit is contained in:
Mykhailo Budiakov
2025-07-18 17:55:19 +03:00
parent 264d3ccbff
commit 65ec43fcaa
3 changed files with 4 additions and 12 deletions
+2 -3
View File
@@ -15,7 +15,6 @@ import {
rollSkillMacro,
rollSkillTestAndDamageForOwnedItem,
} from "./other/macro-functions.js";
import DGUtils from "./other/utility-functions.js";
import { handleInlineActions } from "./other/inline.js";
Hooks.once("init", async () => {
@@ -202,8 +201,8 @@ Hooks.on("renderGamePause", function (_, html, options) {
Hooks.on("renderChatLog", async (app, element, context, options) => {
element.addEventListener("click", (event) => {
const btnWithAction = DGUtils.htmlClosest(event.target, "button[data-action]");
const message = DGUtils.htmlClosest(event.target, "li[data-message-id]");
const btnWithAction = event.target.closest("button[data-action]");
const message = event.target.closest("li[data-message-id]")
const { messageId } = message?.dataset || {}
if (btnWithAction && messageId) {
-7
View File
@@ -33,11 +33,4 @@ export default class DGUtils {
static formatStringWithLeadingPlus(number) {
return number > 0 ? `+${number}` : number.toString();
}
static htmlClosest(element, selectors) {
if (element instanceof Element) {
return element.closest(selectors);
}
return null
}
}
+2 -2
View File
@@ -409,8 +409,8 @@ export class DGPercentileRoll extends DGRoll {
}
get exhausted() {
const isExhausted = false;
const exhaustedCheckPenalty = -20;
let isExhausted = false;
let exhaustedCheckPenalty = -20;
try {
// I suspect (but am not entirely certain) that being tired doesn't make you less lucky)