diff --git a/ui-tui/src/app/useInputHandlers.ts b/ui-tui/src/app/useInputHandlers.ts index 715d775eee..1d9e834f97 100644 --- a/ui-tui/src/app/useInputHandlers.ts +++ b/ui-tui/src/app/useInputHandlers.ts @@ -386,7 +386,11 @@ export function useInputHandlers(ctx: InputHandlerContext): InputHandlerResult { return void gateway .rpc('config.set', { key: 'yolo', session_id: live.sid }) - .then(r => actions.sys(r ? `yolo ${r.value === '1' ? 'on' : 'off'}` : 'failed to toggle yolo')) + .then(r => + actions.sys( + r?.value === '1' ? 'yolo on' : r?.value === '0' ? 'yolo off' : 'failed to toggle yolo' + ) + ) .catch(() => actions.sys('failed to toggle yolo')) }