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 +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -428,8 +428,15 @@ function codePushify(options = {}) {
428428 CodePush . notifyAppReady ( ) ;
429429 } else {
430430 let rootComponentInstance = this . refs . rootComponent ;
431- let syncStatusCallback = rootComponentInstance && rootComponentInstance . codePushStatusDidChange . bind ( rootComponentInstance ) ;
432- let downloadProgressCallback = rootComponentInstance && rootComponentInstance . codePushDownloadDidProgress . bind ( rootComponentInstance ) ;
431+ if ( rootComponentInstance && rootComponentInstance . codePushStatusDidChange ) {
432+ syncStatusCallback = rootComponentInstance . codePushStatusDidChange . bind ( rootComponentInstance ) ;
433+ }
434+
435+ let downloadProgressCallback ;
436+ if ( rootComponentInstance && rootComponentInstance . codePushDownloadDidProgress ) {
437+ downloadProgressCallback = rootComponentInstance . codePushDownloadDidProgress . bind ( rootComponentInstance ) ;
438+ }
439+
433440 CodePush . sync ( options , syncStatusCallback , downloadProgressCallback ) ;
434441 if ( options . checkFrequency === CodePush . CheckFrequency . ON_APP_RESUME ) {
435442 ReactNative . AppState . addEventListener ( "change" , ( newState ) => {
You can’t perform that action at this time.
0 commit comments