Skip to content

Commit

Permalink
Improve warning messages
Browse files Browse the repository at this point in the history
  • Loading branch information
zoontek committed Sep 5, 2021
1 parent 41e32e8 commit f3511f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ios/RNBootSplash.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ + (void)initWithStoryboard:(NSString * _Nonnull)storyboardName
UIViewController *rootVC = RCTPresentedViewController();

if (!rootVC) {
RCTLogError(@"react-native-bootsplash has been initialized too early: rootViewController must be set");
RCTLogWarn(@"react-native-bootsplash has been initialized too early: rootViewController must be set");
return;
}

Expand Down Expand Up @@ -174,7 +174,7 @@ + (void)hideWithTask:(RNBootSplashTask *)task {
resolver:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)reject) {
if (_rootView == nil)
return reject(@"uninitialized_module", @"react-native-bootsplash has not been initialized", nil);
return reject(@"uninitialized_module", @"react-native-bootsplash has not been initialized, or has been too early", nil);

RNBootSplashTask *task = [[RNBootSplashTask alloc] initWithType:RNBootSplashTaskTypeShow
fade:fade
Expand All @@ -190,7 +190,7 @@ + (void)hideWithTask:(RNBootSplashTask *)task {
resolver:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)reject) {
if (_rootView == nil)
return reject(@"uninitialized_module", @"react-native-bootsplash has not been initialized", nil);
return reject(@"uninitialized_module", @"react-native-bootsplash has not been initialized, or has been too early", nil);

RNBootSplashTask *task = [[RNBootSplashTask alloc] initWithType:RNBootSplashTaskTypeHide
fade:fade
Expand Down

0 comments on commit f3511f0

Please sign in to comment.