This repository was archived by the owner on May 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -410,6 +410,9 @@ function codePushify(options = {}) {
410
410
if ( ! React ) {
411
411
try { React = ReactNative . React ; } catch ( e ) { }
412
412
if ( ! React ) {
413
+ throw new Error ( "Unable to find the 'React' module." ) ;
414
+ }
415
+ if ( ! React . Component ) {
413
416
throw new Error (
414
417
`Unable to find the 'Component' class, please either:
415
418
1. Upgrade to a newer version of React Native that supports it, or
@@ -423,8 +426,7 @@ function codePushify(options = {}) {
423
426
let rootComponentInstance = this . refs . rootComponent ;
424
427
let syncStatusCallback = rootComponentInstance && rootComponentInstance . codePushStatusDidChange ;
425
428
let downloadProgressCallback = rootComponentInstance && rootComponentInstance . codePushDownloadDidProgress ;
426
-
427
- CodePush . sync ( options , syncStatusCallback , downloadProgressCallback ) ;
429
+ CodePush . sync ( options , syncStatusCallback , downloadProgressCallback )
428
430
if ( options . syncMode === CodePush . SyncMode . ON_APP_RESUME ) {
429
431
ReactNative . AppState . addEventListener ( "change" , ( newState ) => {
430
432
newState === "active" && CodePush . sync ( options , syncStatusCallback , downloadProgressCallback ) ;
You can’t perform that action at this time.
0 commit comments