Pārlūkot izejas kodu

Remove undefined rootView (#3542)

NaoyaKurahashi 6 gadus atpakaļ
vecāks
revīzija
4c20820169
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 4
    4
      ios/RCCViewController.m

+ 4
- 4
ios/RCCViewController.m Parādīt failu

@@ -205,8 +205,8 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
205 205
 }
206 206
 
207 207
 - (void)sendScreenChangedEvent:(NSString *)eventName {
208
-    if (self.rootView != nil) {
209
-        RCTRootView *rootView = self.rootView;
208
+    if (self.view != nil) {
209
+        RCTRootView *rootView = self.view;
210 210
         
211 211
         if (rootView.appProperties && rootView.appProperties[@"navigatorEventID"]) {
212 212
             
@@ -220,8 +220,8 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
220 220
 }
221 221
 
222 222
 - (void)sendGlobalScreenEvent:(NSString *)eventName endTimestampString:(NSString *)endTimestampStr shouldReset:(BOOL)shouldReset {
223
-    if (self.rootView != nil){
224
-        RCTRootView *rootView = self.rootView;
223
+    if (self.view != nil){
224
+        RCTRootView *rootView = self.view;
225 225
         NSString *screenName = [rootView moduleName];
226 226
         
227 227
         [[[RCCManager sharedInstance] getBridge].eventDispatcher sendAppEventWithName:eventName body:@