diff options
| author | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-14 04:36:36 +0000 |
|---|---|---|
| committer | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-14 04:36:36 +0000 |
| commit | 8b46ab31a96b6b6129f624719ac33ddf761805f1 (patch) | |
| tree | dd05781a7bf2932f166b3596c1dc66b4323ba2f0 | |
| parent | 98f0035a9598ba2d50e00b9d7302ecb501a84900 (diff) | |
Fix some more issues related to ESLint 'eqeqeq' changes (again).
| -rw-r--r-- | js/App.js | 2 | ||||
| -rw-r--r-- | js/PrefHelpers.js | 2 | ||||
| -rwxr-xr-x | js/common.js | 21 |
3 files changed, 13 insertions, 12 deletions
@@ -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); + })); } }; |