diff --git a/tranga-website/src/Components/Settings/UserAgent.tsx b/tranga-website/src/Components/Settings/UserAgent.tsx index bd0d460..684b789 100644 --- a/tranga-website/src/Components/Settings/UserAgent.tsx +++ b/tranga-website/src/Components/Settings/UserAgent.tsx @@ -14,7 +14,7 @@ import {GetUserAgent, ResetUserAgent, UpdateUserAgent} from "../../api/BackendSe export default function UserAgent({backendSettings}: {backendSettings?: IBackendSettings}) { const apiUri = useContext(ApiUriContext); const [loading, setLoading] = useState(false); - const [value, setValue] = useState(backendSettings?.userAgent); + const [value, setValue] = useState(backendSettings?.userAgent??""); const [color, setColor] = useState("neutral"); const keyDown : KeyboardEventHandler = useCallback((e) => { @@ -39,7 +39,7 @@ export default function UserAgent({backendSettings}: {backendSettings?: IBackend }, [apiUri]); useEffect(() => { - setValue(backendSettings?.userAgent); + setValue(backendSettings?.userAgent??""); }, [backendSettings]); return (