Skip to content
This repository has been archived by the owner on Apr 21, 2020. It is now read-only.

Commit

Permalink
fix parseValue
Browse files Browse the repository at this point in the history
  • Loading branch information
joesonw committed Aug 6, 2017
1 parent 471c69f commit 642c0d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@t2ee/core",
"version": "0.1.18",
"version": "0.1.19",
"description": "@t2ee core library",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
8 changes: 6 additions & 2 deletions src/configuration/ConfigurationStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,12 @@ export default class ConfigurationStore {
}
} else if (value.split('.')[0] in ConfigurationStore.types) { // simple object
const values: string[] = value.split('.');
const rest: string = values.slice(1).join('.');
value = _.get(ConfigurationStore.types[values[0]], rest);
if (values.length === 1) {
value = ConfigurationStore.types[values[0]];
} else {
const rest: string = values.slice(1).join('.');
value = _.get(ConfigurationStore.types[values[0]], rest);
}
}
return value;
}
Expand Down

0 comments on commit 642c0d3

Please sign in to comment.