Fix type errors due to unknow type in try catch

This commit is contained in:
Labhansh Agrawal 2021-08-30 13:37:13 +00:00
parent b5cc6e7662
commit c6dfab9e67
6 changed files with 17 additions and 9 deletions

View file

@ -352,7 +352,8 @@ export default class Term extends React.PureComponent<TermProps> {
.forEach((option) => {
try {
this.term.setOption(option, nextTermOptions[option]);
} catch (e) {
} catch (_e) {
const e = _e as {message: string};
if (/The webgl renderer only works with the webgl char atlas/i.test(e.message)) {
// Ignore this because the char atlas will also be changed
} else {