Skip to content

Commit

Permalink
Merge pull request #45757 from Expensify/vit-tryToFixCompleOnboarding…
Browse files Browse the repository at this point in the history
…Crash

Return early if the hybrid module is not defined
  • Loading branch information
tgolen authored Jul 19, 2024
2 parents 79d0af7 + acc94de commit ad61dc5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/HybridAppMiddleware/index.ios.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ function HybridAppMiddleware({children, authenticated}: HybridAppMiddlewareProps
return;
}

if (!NativeModules.HybridAppModule) {
Log.hmmm(`[HybridApp] Onboarding status has changed, but the HybridAppModule is not defined`);
return;
}

Log.info(`[HybridApp] Onboarding status has changed. Propagating new value to OldDot`, true, {completedHybridAppOnboarding});
NativeModules.HybridAppModule.completeOnboarding(completedHybridAppOnboarding);
}, [completedHybridAppOnboarding]);
Expand Down

0 comments on commit ad61dc5

Please sign in to comment.