diff --git a/console/src/constants.js b/console/src/constants.js index b0614bc7a4c..074be27cc9a 100644 --- a/console/src/constants.js +++ b/console/src/constants.js @@ -1,3 +1 @@ -const SERVER_CONSOLE_MODE = 'server'; - -export { SERVER_CONSOLE_MODE }; +export const SERVER_CONSOLE_MODE = 'server'; diff --git a/console/src/helpers/semver.js b/console/src/helpers/semver.js index 8ecd4e7bfa9..e7e18a65fd9 100644 --- a/console/src/helpers/semver.js +++ b/console/src/helpers/semver.js @@ -16,12 +16,15 @@ const componentsSemver = { const getPreRelease = version => { const prerelease = semver.prerelease(version); + if (!prerelease) { + return ''; + } if (prerelease.length === 1) { const regex = /(alpha|beta)(\d+)/gm; const str = prerelease[0]; const m = regex.exec(str); if (m.length < 3) { - return []; + return ''; } return m.slice(1, 3); }