[PR #2361] [CLOSED] Remove unnecessary return statements #3743

Closed
opened 2026-02-27 01:53:37 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/electerm/electerm/pull/2361
Author: @ic-768
Created: 1/22/2022
Status: Closed

Base: masterHead: Remove-returns


📝 Commits (4)

📊 Changes

39 files changed (+130 additions, -272 deletions)

View changed files

📝 src/app/common/pass-enc.js (+8 -16)
📝 src/app/preload/preload.js (+2 -3)
📝 src/app/server/download-upgrade.js (+1 -3)
📝 src/app/server/session.js (+2 -4)
📝 src/app/upgrade/index.js (+1 -3)
📝 src/client/common/class.js (+1 -3)
📝 src/client/common/mode2permission.js (+2 -3)
📝 src/client/components/bookmark-form/quick-command-list.jsx (+2 -3)
📝 src/client/components/bookmark-form/quick-command.jsx (+1 -3)
📝 src/client/components/bookmark-form/serial-form-ui.jsx (+5 -46)
📝 src/client/components/bookmark-form/ssh-form-ui.jsx (+10 -16)
📝 src/client/components/bookmark-form/use-quick-commands.jsx (+1 -3)
📝 src/client/components/main/system-menu.jsx (+3 -6)
📝 src/client/components/main/upgrade.jsx (+1 -3)
📝 src/client/components/quick-commands/quick-commands-list.jsx (+3 -8)
📝 src/client/components/quick-commands/quick-commands-select.jsx (+1 -5)
📝 src/client/components/session/index.jsx (+3 -10)
📝 src/client/components/setting-panel/setting.jsx (+7 -13)
📝 src/client/components/setting-panel/tree-list.jsx (+7 -11)
📝 src/client/components/sftp/file-item.jsx (+5 -6)

...and 19 more files

📄 Description

There were numerous instances where a return keyword was used where it could have been omitted.
I have changed as many as I could find for a cleaner and more readable code.
Also, in many mapping functions, index variables were declared but never used.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/electerm/electerm/pull/2361 **Author:** [@ic-768](https://github.com/ic-768) **Created:** 1/22/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `Remove-returns` --- ### 📝 Commits (4) - [`59b5c7f`](https://github.com/electerm/electerm/commit/59b5c7f492398deccd4f6a7c3af0dbc03eaf7304) Remove unnecessary return statements - [`2ea67bf`](https://github.com/electerm/electerm/commit/2ea67bf9d021623772c9b3d2d777a439e8941483) Remove auto-formatting - [`df420da`](https://github.com/electerm/electerm/commit/df420da94d9954b103b2b7d2342ee1a721b680b9) Fix variable - [`605d469`](https://github.com/electerm/electerm/commit/605d469fa4ad9d4ee0f3830e1cdd22e4b380c715) More return removals ### 📊 Changes **39 files changed** (+130 additions, -272 deletions) <details> <summary>View changed files</summary> 📝 `src/app/common/pass-enc.js` (+8 -16) 📝 `src/app/preload/preload.js` (+2 -3) 📝 `src/app/server/download-upgrade.js` (+1 -3) 📝 `src/app/server/session.js` (+2 -4) 📝 `src/app/upgrade/index.js` (+1 -3) 📝 `src/client/common/class.js` (+1 -3) 📝 `src/client/common/mode2permission.js` (+2 -3) 📝 `src/client/components/bookmark-form/quick-command-list.jsx` (+2 -3) 📝 `src/client/components/bookmark-form/quick-command.jsx` (+1 -3) 📝 `src/client/components/bookmark-form/serial-form-ui.jsx` (+5 -46) 📝 `src/client/components/bookmark-form/ssh-form-ui.jsx` (+10 -16) 📝 `src/client/components/bookmark-form/use-quick-commands.jsx` (+1 -3) 📝 `src/client/components/main/system-menu.jsx` (+3 -6) 📝 `src/client/components/main/upgrade.jsx` (+1 -3) 📝 `src/client/components/quick-commands/quick-commands-list.jsx` (+3 -8) 📝 `src/client/components/quick-commands/quick-commands-select.jsx` (+1 -5) 📝 `src/client/components/session/index.jsx` (+3 -10) 📝 `src/client/components/setting-panel/setting.jsx` (+7 -13) 📝 `src/client/components/setting-panel/tree-list.jsx` (+7 -11) 📝 `src/client/components/sftp/file-item.jsx` (+5 -6) _...and 19 more files_ </details> ### 📄 Description There were numerous instances where a return keyword was used where it could have been omitted. I have changed as many as I could find for a cleaner and more readable code. Also, in many mapping functions, index variables were declared but never used. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 01:53:37 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/electerm#3743
No description provided.