mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
do not return a version if there are no migration declarations
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
parent
79e4eaa394
commit
0a4c748c7c
@ -16,6 +16,10 @@ const storageMigrationVersionInjectable = getInjectable({
|
|||||||
instantiate: (di, token) => {
|
instantiate: (di, token) => {
|
||||||
const declarations = di.injectMany(token);
|
const declarations = di.injectMany(token);
|
||||||
|
|
||||||
|
if (declarations.length === 0) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
return declarations.reduce((version, decl) => {
|
return declarations.reduce((version, decl) => {
|
||||||
if (semver.gte(decl.version, version)) {
|
if (semver.gte(decl.version, version)) {
|
||||||
return decl.version;
|
return decl.version;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user