Commit 30fd2d25 authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

produce version warning only if last digit doesn't match

parent 29a7b2df
...@@ -20,9 +20,14 @@ class FractalJS { ...@@ -20,9 +20,14 @@ class FractalJS {
// noinspection JSMethodCanBeStatic // noinspection JSMethodCanBeStatic
async _versionCheck () { async _versionCheck () {
const rv = await store.getters.requestManager.getVersion() const rv = await store.getters.requestManager.getVersion()
const backendVersion = rv.data.version const fractaljsVersions = version.split('.')
if (backendVersion !== version) { const fractaljsMajor = fractaljsVersions[0]
console.warn(`WARNING: The Fractalis backend is version ${backendVersion}, const fractaljsMinor = fractaljsVersions[1]
const fractalisVersions = rv.data.version.split('.')
const fractalisMajor = fractalisVersions[0]
const fractalisMinor = fractalisVersions[1]
if (fractaljsMajor !== fractalisMajor || fractaljsMinor !== fractalisMinor) {
console.warn(`WARNING: The Fractalis backend is version ${rv.data.version},
but the frontend is version ${version}. This might or might not cause issues.`) but the frontend is version ${version}. This might or might not cause issues.`)
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment