be a little more defensive about the error
@@ -39,7 +39,7 @@ export default class LazyCitationGloss extends React.PureComponent<Props, State>
});
}).catch((err: AxiosError /* Fairly sure this is the type, though AxiosPromise gets abstracted away */) => {
this.setState({
- error: err ? err.message : 'Could not load paper data',
+ error: err?.message ? err.message : 'Could not load paper data',
});
});
} else {
