Skip to content

Commit

Permalink
Change getVersionSuccess reducer
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemBaskal committed Jul 14, 2020
1 parent 54693bb commit 61981a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/src/reducers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const dashboard = handleActions(
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;

if (payload && isVersionGreater(currentVersion, payload.new_version)) {
if (!payload.disabled && isVersionGreater(currentVersion, payload.new_version)) {
const {
announcement_url: announcementUrl,
new_version: newVersion,
Expand All @@ -96,14 +96,15 @@ const dashboard = handleActions(
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
checkUpdateFlag: !!payload,
checkUpdateFlag: !payload.disabled,
};
return newState;
}

return {
...state,
processingVersion: false,
checkUpdateFlag: !payload.disabled,
};
},

Expand Down

0 comments on commit 61981a9

Please sign in to comment.