Skip to content

Commit

Permalink
Fixed: some JS warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan0sz committed Apr 4, 2024
1 parent 5b0b5d3 commit b9b4273
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions assets/src/js/admin/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ document.addEventListener('DOMContentLoaded', () => {

let is_wizard = document.getElementById('plausible-analytics-wizard');

if (is_wizard !== undefined) {
if (is_wizard !== null) {
return;
}

Expand Down Expand Up @@ -175,7 +175,9 @@ document.addEventListener('DOMContentLoaded', () => {
}
}

container.removeChild(additionalMessage);
if (additionalMessage !== undefined) {
container.removeChild(additionalMessage);
}
},

/**
Expand Down Expand Up @@ -389,11 +391,11 @@ document.addEventListener('DOMContentLoaded', () => {
return false;
}).then(response => {
if (response.success === true) {
if (plausible.data !== undefined && plausible.data.message !== undefined) {
if (response.data !== undefined && response.data.message !== undefined) {
plausible.notice(response.data.message);
}
} else {
if (plausible.data !== undefined && plausible.data.message !== undefined) {
if (response.data !== undefined && response.data.message !== undefined) {
plausible.notice(response.data.message, true);
}
}
Expand Down

0 comments on commit b9b4273

Please sign in to comment.