This repository was archived by the owner on May 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,22 +94,24 @@ function checkForUpdate() {
9494 return new Promise ( ( resolve , reject ) => {
9595 sdk . queryUpdateWithCurrentPackage ( queryPackage , ( err , update ) => {
9696 if ( err ) {
97- reject ( err ) ;
97+ return reject ( err ) ;
9898 }
9999
100- if ( update ) {
101- update = extend ( update , packageMixins . remote ) ;
102-
103- NativeCodePush . isFailedUpdate ( update . packageHash )
104- . then ( ( isFailedHash ) => {
105- update . failedApply = isFailedHash ;
106- resolve ( update ) ;
107- } )
108- . catch ( reject )
109- . done ( ) ;
110- } else {
111- resolve ( update ) ;
100+ // Ignore updates that require a newer app version,
101+ // since the end-user couldn't reliably apply it
102+ if ( ! update || update . updateAppVersion ) {
103+ return resolve ( null ) ;
112104 }
105+
106+ update = extend ( update , packageMixins . remote ) ;
107+
108+ NativeCodePush . isFailedUpdate ( update . packageHash )
109+ . then ( ( isFailedHash ) => {
110+ update . failedApply = isFailedHash ;
111+ resolve ( update ) ;
112+ } )
113+ . catch ( reject )
114+ . done ( ) ;
113115 } )
114116 } ) ;
115117 } ) ;
You can’t perform that action at this time.
0 commit comments