Fix blank webui on some browsers

This commit is contained in:
Matthieu Hostache 2020-09-28 12:14:04 +02:00 committed by GitHub
parent c5b4e589ff
commit fc7002fbab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 8 deletions

View file

@ -12488,11 +12488,6 @@
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"dev": true "dev": true
}, },
"semver-regex": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.1.tgz",
"integrity": "sha512-3dPcmFqxblWB/cppQ2qXWqlp9b6GLgAS032+Ec5E0waDVHTkwYIL+7BFI9UqEe0tkoHle2f3pBgvT/Xl95+Dig=="
},
"send": { "send": {
"version": "0.17.1", "version": "0.17.1",
"resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",

View file

@ -26,7 +26,6 @@
"moment": "^2.24.0", "moment": "^2.24.0",
"quasar": "^1.4.4", "quasar": "^1.4.4",
"query-string": "^6.13.1", "query-string": "^6.13.1",
"semver-regex": "^3.1.1",
"vh-check": "^2.0.5", "vh-check": "^2.0.5",
"vue-chartjs": "^3.4.2", "vue-chartjs": "^3.4.2",
"vuex-map-fields": "^1.3.4" "vuex-map-fields": "^1.3.4"

View file

@ -46,7 +46,6 @@
import config from '../../../package' import config from '../../../package'
import PlatformAuthState from '../platform/PlatformAuthState' import PlatformAuthState from '../platform/PlatformAuthState'
import { mapActions, mapGetters } from 'vuex' import { mapActions, mapGetters } from 'vuex'
import semverRegex from 'semver-regex'
export default { export default {
name: 'NavBar', name: 'NavBar',
@ -55,7 +54,7 @@ export default {
...mapGetters('core', { coreVersion: 'version' }), ...mapGetters('core', { coreVersion: 'version' }),
version () { version () {
if (!this.coreVersion.Version) return null if (!this.coreVersion.Version) return null
return semverRegex().test(this.coreVersion.Version) return /^(v?\d+\.\d+)/.test(this.coreVersion.Version)
? this.coreVersion.Version ? this.coreVersion.Version
: this.coreVersion.Version.substring(0, 7) : this.coreVersion.Version.substring(0, 7)
}, },