Skip to content

Commit

Permalink
do not set variable in condition
Browse files Browse the repository at this point in the history
Co-authored-by: David Walker <[email protected]>
  • Loading branch information
lucebac and d0sboots authored Sep 26, 2024
1 parent 92cf53e commit 6ca6cfe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ScriptEditor/ui/ScriptEditorRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,11 @@ function Root(props: IProps): React.ReactElement {
}

function loadAllServerScripts(): void {
let server;
if (!currentScript || !(server = GetServer(currentScript.hostname))) {
if (!currentScript) {
return;
}
const server = GetServer(currentScript.hostname);
if (!server) {
return;
}

Expand Down

0 comments on commit 6ca6cfe

Please sign in to comment.