We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ccf4f34 + b7e116f commit ea9c83cCopy full SHA for ea9c83c
src/tree.js
@@ -40,9 +40,9 @@ export function getAllApplications(cls = null) {
40
*/
41
export function getApplication({ applicationsTree, name, version = null, build = "Default" }) {
42
const app = applicationsTree[name];
43
- // eslint-disable-next-line no-param-reassign
44
- if (!version) version = app.defaultVersion;
45
- return app[version][build];
+ const version_ = version || app.defaultVersion;
+ if (!app[version_]) console.log(`Version ${version_} not available for ${name} !`);
+ return app[version_]?.[build];
46
}
47
48
const { applicationsTree } = getAllApplications(null);
0 commit comments