Lints for the Linter god

This commit is contained in:
Mouse Reeve 2021-09-09 08:24:36 -07:00
parent 055cced75b
commit 5f584c1403

View file

@ -26,8 +26,10 @@ let StatusCache = new class {
// Used in set reading goal // Used in set reading goal
let key = event.target.dataset.cacheDraft; let key = event.target.dataset.cacheDraft;
let value = event.target.value; let value = event.target.value;
if (!value) { if (!value) {
window.localStorage.removeItem(key); window.localStorage.removeItem(key);
return; return;
} }
@ -44,6 +46,7 @@ let StatusCache = new class {
// Used in set reading goal // Used in set reading goal
let key = node.dataset.cacheDraft; let key = node.dataset.cacheDraft;
let value = window.localStorage.getItem(key); let value = window.localStorage.getItem(key);
if (!value) { if (!value) {
return; return;
} }
@ -75,13 +78,15 @@ let StatusCache = new class {
// Close modals // Close modals
let modal = form.closest(".modal.is-active"); let modal = form.closest(".modal.is-active");
if (!!modal) {
if (modal) {
modal.getElementsByClassName("modal-close")[0].click(); modal.getElementsByClassName("modal-close")[0].click();
} }
// Close reply panel // Close reply panel
let reply = form.closest(".reply-panel"); let reply = form.closest(".reply-panel");
if (!!reply) {
if (reply) {
document.querySelector("[data-controls=" + reply.id + "]").click(); document.querySelector("[data-controls=" + reply.id + "]").click();
} }