From 8b46ab31a96b6b6129f624719ac33ddf761805f1 Mon Sep 17 00:00:00 2001 From: supahgreg Date: Tue, 14 Oct 2025 04:36:36 +0000 Subject: Fix some more issues related to ESLint 'eqeqeq' changes (again). --- js/App.js | 2 +- js/PrefHelpers.js | 2 +- js/common.js | 21 +++++++++++---------- 3 files changed, 13 insertions(+), 12 deletions(-) (limited to 'js') 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); + })); } }; -- cgit v1.2.3-54-g00ecf