mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix failing assert in EventTarget
Summary: changelog: [internal] calling `setEnabled(true)` needs to have a matching `setEnabled(false)` in order for `eventTarget_` to be deallocated correctly. Also, retaining `eventTarget_` longer, does not mean instanceHandle will be available later on. Reviewed By: p-sun Differential Revision: D31503119 fbshipit-source-id: 324e16fe0f6ad937ab2c38be9a536bdf14851172
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c901c43d11
commit
c99a0212a0
@@ -156,9 +156,6 @@ static ModalHostViewEventEmitter::OnOrientationChange onOrientationChangeStruct(
|
||||
auto eventEmitter = [self modalEventEmitter];
|
||||
if (eventEmitter) {
|
||||
eventEmitter->onShow(ModalHostViewEventEmitter::OnShow{});
|
||||
|
||||
// A hack so that EventEmitter.cpp's eventTarget_ does not become null when modal is dismissed
|
||||
eventEmitter->setEnabled(true);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user