summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/main/daemon-rpc.ts10
-rw-r--r--gui/src/renderer/components/Connect.tsx4
-rw-r--r--gui/src/renderer/components/SelectLocation.tsx6
-rw-r--r--gui/src/shared/gettext.ts2
4 files changed, 10 insertions, 12 deletions
diff --git a/gui/src/main/daemon-rpc.ts b/gui/src/main/daemon-rpc.ts
index 4bbca29930..006dd12866 100644
--- a/gui/src/main/daemon-rpc.ts
+++ b/gui/src/main/daemon-rpc.ts
@@ -940,18 +940,16 @@ function convertFromBridgeSettings(
const localSettings = bridgeSettings.local;
if (localSettings) {
return customSettings({
- port: localSettings?.port!,
- peer: localSettings?.peer!,
+ port: localSettings.port,
+ peer: localSettings.peer,
});
}
const remoteSettings = bridgeSettings.remote;
if (remoteSettings) {
return customSettings({
- address: remoteSettings?.address!,
- auth: {
- ...remoteSettings?.auth!,
- },
+ address: remoteSettings.address,
+ auth: remoteSettings.auth && { ...remoteSettings.auth },
});
}
diff --git a/gui/src/renderer/components/Connect.tsx b/gui/src/renderer/components/Connect.tsx
index c0c257b736..a6654ad8c0 100644
--- a/gui/src/renderer/components/Connect.tsx
+++ b/gui/src/renderer/components/Connect.tsx
@@ -188,8 +188,6 @@ export default class Connect extends React.Component<IProps, IState> {
return HeaderBarStyle.success;
case 'nothing':
return HeaderBarStyle.error;
- default:
- throw new Error(`Invalid action after disconnection: ${status.details}`);
}
}
}
@@ -244,8 +242,6 @@ export default class Connect extends React.Component<IProps, IState> {
return MarkerStyle.secure;
case 'nothing':
return MarkerStyle.unsecure;
- default:
- throw new Error(`Invalid action after disconnection: ${status.details}`);
}
}
}
diff --git a/gui/src/renderer/components/SelectLocation.tsx b/gui/src/renderer/components/SelectLocation.tsx
index 52943549c6..c42994b572 100644
--- a/gui/src/renderer/components/SelectLocation.tsx
+++ b/gui/src/renderer/components/SelectLocation.tsx
@@ -60,7 +60,11 @@ export default class SelectLocation extends React.Component<IProps> {
this.scrollToSelectedCell();
}
- public componentDidUpdate(prevProps: IProps, _prevState: {}, snapshot?: ISelectLocationSnapshot) {
+ public componentDidUpdate(
+ prevProps: IProps,
+ _prevState: unknown,
+ snapshot?: ISelectLocationSnapshot,
+ ) {
if (this.props.locationScope !== prevProps.locationScope) {
this.restoreScrollPosition(this.props.locationScope);
diff --git a/gui/src/shared/gettext.ts b/gui/src/shared/gettext.ts
index cfee187351..df15e0c2ef 100644
--- a/gui/src/shared/gettext.ts
+++ b/gui/src/shared/gettext.ts
@@ -50,7 +50,7 @@ function parseTranslation(locale: string, domain: string, catalogue: Gettext): b
return false;
}
- let translations: object;
+ let translations: ReturnType<typeof po.parse>;
try {
translations = po.parse(contents);
} catch (error) {