diff --git a/source/dom/events.mjs b/source/dom/events.mjs index 9125514d9f89df6fe18372d376e8f40e3141e752..098a32f0b10d4ac1e84cfbac418f69852ad5911a 100644 --- a/source/dom/events.mjs +++ b/source/dom/events.mjs @@ -14,7 +14,7 @@ export { fireEvent, fireCustomEvent, findTargetElementFromEvent }; /** * The function sends an event * - * @param {HTMLElement|HTMLCollection|NodeList} element + * @param {Element | Node | HTMLCollection | NodeList} element * @param {string} type * @return {void} * @license AGPLv3 @@ -55,8 +55,9 @@ function fireEvent(element, type) { /** * You can call the function via the monster namespace `new Monster.DOM.fireCustomEvent()`. * - * @param {HTMLElement|HTMLCollection|NodeList} element + * @param {Element | Node | HTMLCollection | NodeList} element * @param {string} type + * @param {object} detail * @return {void} * @license AGPLv3 * @since 1.29.0 @@ -66,7 +67,6 @@ function fireEvent(element, type) { * @summary Construct and send and event */ function fireCustomEvent(element, type, detail) { - const document = getDocument(); if (element instanceof HTMLElement) { if (!isObject(detail)) { diff --git a/source/i18n/translations.mjs b/source/i18n/translations.mjs index fa28af39f2080bcaf41dd794dc54ea66f0d7a1a0..f0fae3f1a305c0988b71d29a7010679aaf7f2352 100644 --- a/source/i18n/translations.mjs +++ b/source/i18n/translations.mjs @@ -109,7 +109,7 @@ class Translations extends Base { if (count === 0) { // special handling for zero count if (r.hasOwnProperty("zero")) { - return validateString(r["zero"]); + return validateString(r?.zero); } }