Skip to content
Snippets Groups Projects
Verified Commit 9d4c8df6 authored by Martin Weise's avatar Martin Weise
Browse files

Default better

parent bba5fca3
No related branches found
No related tags found
No related merge requests found
function getVersion() { function getVersion() {
const segments = location.pathname.split('/'); const segments = location.pathname.split('/');
if (segments.length > 4) { if (segments.length > 4 && (segments[3].match(/[0-9]\.[0-9]\.[0-9]/g) || segments[3] == 'latest')) {
console.debug('version', segments[3]); console.debug('version', segments[3]);
return segments[3]; return segments[3];
} else {
console.debug('default version', '__APPVERSION__');
return '__APPVERSION__';
} }
console.debug('default version', '__APPVERSION__');
return '__APPVERSION__';
} }
function switchVersion(value) { function switchVersion(value) {
if (!value) { return } if (!value) { return }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment