diff --git a/packages/desktop-client/src/components/Settings.js b/packages/desktop-client/src/components/Settings.js index ff99427..4314789 100644 --- a/packages/desktop-client/src/components/Settings.js +++ b/packages/desktop-client/src/components/Settings.js @@ -476,14 +476,16 @@ function SettingsLink({ to, name, style, first, last }) { function Version() { let [version, setVersion] = useState(''); - useEffect(async () => { - const { error, version } = await send('get-server-version'); + useEffect(() => { + (async () => { + const { error, version } = await send('get-server-version'); - if (error) { - setVersion(''); - } else { - setVersion(version); - } + if (error) { + setVersion(''); + } else { + setVersion(version); + } + })(); }, []); return (