fix: Fix unmount crash

This commit is contained in:
Marc Rousavy 2022-02-17 13:42:02 +01:00 committed by GitHub
parent c2de683d67
commit 06bcb53691
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -409,15 +409,6 @@ export class Camera extends React.PureComponent<CameraProps> {
this.lastFrameProcessor = frameProcessor;
}
}
/** @internal */
componentWillUnmount(): void {
if (!this.isNativeViewMounted) return;
if (this.lastFrameProcessor != null || this.props.frameProcessor != null) {
this.unsetFrameProcessor();
this.lastFrameProcessor = undefined;
}
}
//#endregion
/** @internal */