use alternative ways to determine blank message parameter

This commit is contained in:
buzz-lightsnack-2007 2024-05-12 19:20:28 +08:00
parent e5f6f353ad
commit 9ce1dfb6eb

View file

@ -21,7 +21,7 @@ export default class logging {
@param {bool} PRIORITY automatically dismiss other, older messages */ @param {bool} PRIORITY automatically dismiss other, older messages */
constructor(TITLE, MESSAGE, PRIORITY = true) { constructor(TITLE, MESSAGE, PRIORITY = true) {
// Set this message's properties. // Set this message's properties.
if (MESSAGE == null) { if (!MESSAGE || (typeof MESSAGE).includes(`undef`)) {
this.message = TITLE; this.message = TITLE;
} else { } else {
this.title = TITLE; this.title = TITLE;