Conform more of the codebase to strict types (#11191)

This commit is contained in:
Michael Telatynski 2023-07-05 11:53:22 +01:00 committed by GitHub
parent 4044c2aa66
commit 8107f1d271
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 88 additions and 57 deletions

View file

@ -60,7 +60,7 @@ export default class ChangelogDialog extends React.Component<IProps, State> {
const body = await res.json();
this.setState({ [repo]: body.commits });
} catch (err) {
this.setState({ [repo]: err.message });
this.setState({ [repo]: err instanceof Error ? err.message : _t("Unknown error") });
}
}