Skip to content

Commit 46b8ed6

Browse files
authored
fix admin JS (#17967)
1 parent 0e0007e commit 46b8ed6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

warehouse/admin/static/js/warehouse.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ if (OrganizationApplicationsTable.length) {
212212
}
213213

214214
let organizationApplicationTurboModeSwitch = document.getElementById("organizationApplicationTurboMode");
215-
if (organizationApplicationTurboModeSwitch !== "undefined") {
215+
if (organizationApplicationTurboModeSwitch !== null) {
216216
let organizationApplicationTurboModeEnabled = JSON.parse(localStorage.getItem("organizationApplicationTurboModeEnabled") || false);
217217
organizationApplicationTurboModeSwitch.addEventListener("click", (event) => {
218218
localStorage.setItem("organizationApplicationTurboModeEnabled", event.target.checked);
@@ -232,7 +232,7 @@ if (organizationApplicationTurboModeSwitch !== "undefined") {
232232
}
233233

234234
let requestMoreInformationEmailTemplateButton = document.getElementById("requestMoreInformationEmailTemplateButton");
235-
if (requestMoreInformationEmailTemplateButton !== "undefined") {
235+
if (requestMoreInformationEmailTemplateButton !== null) {
236236
requestMoreInformationEmailTemplateButton.addEventListener("click", () => {
237237
let requestMoreInfoModalMessage = document.getElementById("requestMoreInfoModalMessage");
238238
let requestMoreInformationEmailTemplate = document.getElementById("requestMoreInformationEmailTemplate");
@@ -241,7 +241,7 @@ if (requestMoreInformationEmailTemplateButton !== "undefined") {
241241
}
242242

243243
let editModalForm = document.getElementById("editModalForm");
244-
if (editModalForm !== "undefined") {
244+
if (editModalForm !== null) {
245245
if (editModalForm.classList.contains("edit-form-errors")) {
246246
document.getElementById("editModalButton").click();
247247
}

0 commit comments

Comments
 (0)