Add additional ESLint rules

This commit is contained in:
Marc Rousavy
2021-03-31 15:59:14 +02:00
parent e02c051e19
commit 24a0bcde48
3 changed files with 13 additions and 3 deletions

View File

@@ -354,8 +354,6 @@ export class Camera extends React.PureComponent<CameraProps, CameraState> {
//#region Events (Wrapped to maintain reference equality)
private onError(event: NativeSyntheticEvent<OnErrorEvent>): void {
if (event == null) throw new Error('onError() was invoked but event was null!');
if (this.props.onError != null) {
const error = event.nativeEvent;
const cause = isErrorWithCause(error.cause) ? error.cause : undefined;