Skip to content

Commit ea9c83c

Browse files
Merge pull request #24 from Exabyte-io/chore/SOF-6552
chore/SOF-6552
2 parents ccf4f34 + b7e116f commit ea9c83c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tree.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export function getAllApplications(cls = null) {
4040
*/
4141
export function getApplication({ applicationsTree, name, version = null, build = "Default" }) {
4242
const app = applicationsTree[name];
43-
// eslint-disable-next-line no-param-reassign
44-
if (!version) version = app.defaultVersion;
45-
return app[version][build];
43+
const version_ = version || app.defaultVersion;
44+
if (!app[version_]) console.log(`Version ${version_} not available for ${name} !`);
45+
return app[version_]?.[build];
4646
}
4747

4848
const { applicationsTree } = getAllApplications(null);

0 commit comments

Comments
 (0)