delete unneeded fn
return let because variable it overridden
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user