From 12f4ec7d6c0551f11b513fe68c6afa92cce314e4 Mon Sep 17 00:00:00 2001 From: E44 <129310925+programmer-44@users.noreply.github.com> Date: Sat, 17 Jan 2026 16:34:49 +0100 Subject: [PATCH] refactor(control): improve structure in api_handler --- control/frontend/src/lib/ts/api_handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/control/frontend/src/lib/ts/api_handler.ts b/control/frontend/src/lib/ts/api_handler.ts index a3ac633..2f8d26a 100755 --- a/control/frontend/src/lib/ts/api_handler.ts +++ b/control/frontend/src/lib/ts/api_handler.ts @@ -72,6 +72,7 @@ export async function get_file_data( const json_response = raw_response.json as ShellCommandResponse; if (json_response.exitCode === 0 && json_response.stdout.trim() === '') return []; if (handle_shell_error(ip, json_response, command, true)) return null; + if (json_response.stdout.trim() === '') return null; const response: FileInfo[] = json_response.stdout .trim() @@ -281,7 +282,6 @@ function handle_shell_error( ); return true; } - if (shell_response.stdout.trim() === '') return true; return false; }