fix: Catch rare componentWillUnmount
crash
This commit is contained in:
parent
cbaffc20e6
commit
3d098697e9
@ -392,6 +392,7 @@ export class Camera extends React.PureComponent<CameraProps> {
|
|||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
componentWillUnmount(): void {
|
componentWillUnmount(): void {
|
||||||
|
if (!this.isNativeViewMounted) return;
|
||||||
if (this.lastFrameProcessor != null || this.props.frameProcessor != null) {
|
if (this.lastFrameProcessor != null || this.props.frameProcessor != null) {
|
||||||
this.unsetFrameProcessor();
|
this.unsetFrameProcessor();
|
||||||
this.lastFrameProcessor = undefined;
|
this.lastFrameProcessor = undefined;
|
||||||
|
Loading…
Reference in New Issue
Block a user