Change getVersionSuccess reducer

This commit is contained in:
ArtemBaskal 2020-07-14 18:42:24 +03:00
parent 54693bb158
commit 61981a927b
1 changed files with 3 additions and 2 deletions

View File

@ -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,
@ -96,7 +96,7 @@ const dashboard = handleActions(
canAutoUpdate,
isUpdateAvailable: true,
processingVersion: false,
checkUpdateFlag: !!payload,
checkUpdateFlag: !payload.disabled,
};
return newState;
}
@ -104,6 +104,7 @@ const dashboard = handleActions(
return {
...state,
processingVersion: false,
checkUpdateFlag: !payload.disabled,
};
},