Skip to content

Commit acbfe74

Browse files
Fix #27
1 parent 43750d4 commit acbfe74

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-ioc",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "A Lightweight annotation-based dependency injection container for typescript.",
55
"author": "Thiago da Rosa de Bustamante <[email protected]>",
66
"scripts": {

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ if (!isBrowser()) {
1010
const path = require('path');
1111
const searchConfigFile = function() {
1212
let configFile = path.join(__dirname, 'ioc.config');
13-
const ROOT = path.join('/', 'ioc.config');
1413
while (!fs.existsSync(configFile)) {
15-
if (configFile === ROOT) {
14+
const fileOnParent = path.normalize(path.join(path.dirname(configFile), '..', 'ioc.config'));
15+
if (configFile === fileOnParent) {
1616
return null;
1717
}
18-
configFile = path.normalize(path.join(path.dirname(configFile), '..', 'ioc.config'));
18+
configFile = fileOnParent;
1919
}
2020
return configFile;
2121
};

0 commit comments

Comments
 (0)