File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -272,12 +272,20 @@ const LoadingScreen = ({ onEnd }: LoadingScreenProps) => {
272272 return true ; // Continue without OMP plugin
273273 }
274274
275- const versionInfo = response . data . versions [ useAppState . getState ( ) . version ] ;
275+ const versionInfo =
276+ response . data . versions [ useAppState . getState ( ) . version ] ;
276277
277278 if ( versionInfo ) {
278279 response . data . download = versionInfo . download ;
279280 response . data . ompPluginChecksum = versionInfo . ompPluginChecksum ;
280281 response . data . ompPluginDownload = versionInfo . ompPluginDownload ;
282+ } else {
283+ const info = response . data . versions [ response . data . version ] ;
284+ if ( info ) {
285+ response . data . download = info . download ;
286+ response . data . ompPluginChecksum = info . ompPluginChecksum ;
287+ response . data . ompPluginDownload = info . ompPluginDownload ;
288+ }
281289 }
282290
283291 updateInfo = response . data ;
Original file line number Diff line number Diff line change @@ -116,12 +116,19 @@ export const fetchUpdateInfo = async () => {
116116 const hostOS = await type ( ) ;
117117 const response = await getUpdateInfo ( ) ;
118118 if ( response . data ) {
119- const versionInfo = response . data . versions [ version ] ;
119+ const versionInfo = response . data . versions [ useAppState . getState ( ) . version ] ;
120120
121121 if ( versionInfo ) {
122122 response . data . download = versionInfo . download ;
123123 response . data . ompPluginChecksum = versionInfo . ompPluginChecksum ;
124124 response . data . ompPluginDownload = versionInfo . ompPluginDownload ;
125+ } else {
126+ const info = response . data . versions [ response . data . version ] ;
127+ if ( info ) {
128+ response . data . download = info . download ;
129+ response . data . ompPluginChecksum = info . ompPluginChecksum ;
130+ response . data . ompPluginDownload = info . ompPluginDownload ;
131+ }
125132 }
126133
127134 useAppState . getState ( ) . setUpdateInfo ( response . data ) ;
You can’t perform that action at this time.
0 commit comments