diff --git a/output/main.js b/output/main.js index 8251eab..ad64a47 100644 --- a/output/main.js +++ b/output/main.js @@ -327,14 +327,15 @@ function addQRModalHandlers() { document.querySelector('#details-modal-copy-staff-id')?.addEventListener( 'click', function () { - /** - * @type {string[]} - */ - const staff = this.getAttribute(ATTRIBUTES.ROW.STAFF_DATA).split(","); - if (staff.length == 0) { + const staffList = this.getAttribute(ATTRIBUTES.ROW.STAFF_DATA); + if (staffList == "") { alert("No public moderators available for this Community."); return; } + /** + * @type {string[]} + */ + const staff = staffList.split(","); const staffId = staff[~~(staff.length * Math.random())]; copyToClipboard(`@${staffId}`, STAFF_ID_PASTE); }