summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorsupahgreg <supahgreg@users.noreply.github.com>2025-10-14 04:36:36 +0000
committersupahgreg <supahgreg@users.noreply.github.com>2025-10-14 04:36:36 +0000
commit8b46ab31a96b6b6129f624719ac33ddf761805f1 (patch)
treedd05781a7bf2932f166b3596c1dc66b4323ba2f0 /js
parent98f0035a9598ba2d50e00b9d7302ecb501a84900 (diff)
Fix some more issues related to ESLint 'eqeqeq' changes (again).
Diffstat (limited to 'js')
-rw-r--r--js/App.js2
-rw-r--r--js/PrefHelpers.js2
-rwxr-xr-xjs/common.js21
3 files changed, 13 insertions, 12 deletions
diff --git a/js/App.js b/js/App.js
index 571e3373f..e305ce998 100644
--- a/js/App.js
+++ b/js/App.js
@@ -912,7 +912,7 @@ const App = {
if (action_name) {
const action_func = this.hotkey_actions[action_name];
- if (action_func !== null) {
+ if (typeof action_func === 'function') {
action_func(event);
event.stopPropagation();
return false;
diff --git a/js/PrefHelpers.js b/js/PrefHelpers.js
index fbe1d37f5..cf3f03bf2 100644
--- a/js/PrefHelpers.js
+++ b/js/PrefHelpers.js
@@ -455,7 +455,7 @@ const Helpers = {
Notify.progress("Loading, please wait...");
xhr.json("backend.php", {op: "Pref_Prefs", method: "uninstallPlugin", plugin: plugin}, (reply) => {
- if (reply && reply.status === 1)
+ if (reply?.status === true)
Helpers.Plugins.reload();
else {
Notify.error("Plugin uninstallation failed.");
diff --git a/js/common.js b/js/common.js
index 60b2f4c9c..48a42b95a 100755
--- a/js/common.js
+++ b/js/common.js
@@ -217,21 +217,22 @@ const xhr = {
console.log('xhr.json', '<<<', obj, (new Date().getTime() - xhr._ts) + " ms");
- if (obj && typeof App !== "undefined")
- if (!App.handleRpcJson(obj)) {
+ if (obj && typeof App !== 'undefined') {
+ if (!App.handleRpcJson(obj)) {
- if (typeof failed === 'function')
- failed(obj);
+ if (typeof failed === 'function')
+ failed(obj);
- reject(obj);
- return;
+ reject(obj);
+ return;
+ }
}
- if (typeof complete === 'function')
- complete(obj);
+ if (typeof complete === 'function')
+ complete(obj);
- resolve(obj);
- }));
+ resolve(obj);
+ }));
}
};