mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
WebUI: prefer for loop over Array.forEach method
The `for` loop can do everything `forEach` can and doesn't need a closure.
This commit is contained in:
@@ -725,9 +725,8 @@ window.qBittorrent.Search ??= (() => {
|
||||
if (prevSearchPluginsResponse !== responseJSON) {
|
||||
prevSearchPluginsResponse = responseJSON;
|
||||
searchPlugins.length = 0;
|
||||
responseJSON.forEach((plugin) => {
|
||||
for (const plugin of responseJSON)
|
||||
searchPlugins.push(plugin);
|
||||
});
|
||||
|
||||
const pluginOptions = [];
|
||||
pluginOptions.push(createOption("QBT_TR(Only enabled)QBT_TR[CONTEXT=SearchEngineWidget]", "enabled"));
|
||||
|
||||
Reference in New Issue
Block a user