* (ui): fix the version check - strip the v prefix

This commit is contained in:
Andrey Meshkov
2020-07-23 12:27:14 +03:00
parent 4f4a688ee6
commit 1e5419714d
5 changed files with 32 additions and 13 deletions

View File

@@ -14,6 +14,7 @@ import stats from './stats';
import queryLogs from './queryLogs';
import dnsConfig from './dnsConfig';
import filtering from './filtering';
import { areEqualVersions } from '../helpers/version';
const settings = handleActions(
{
@@ -81,7 +82,7 @@ const dashboard = handleActions(
[actions.getVersionSuccess]: (state, { payload }) => {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
if (!payload.disabled && currentVersion !== payload.new_version) {
if (!payload.disabled && !areEqualVersions(currentVersion, payload.new_version)) {
const {
announcement_url: announcementUrl,
new_version: newVersion,