From 1491fa7567bbf79cb1f1bd75e89ec4e3416edd5d Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 21 Sep 2022 17:18:45 -0400 Subject: [PATCH] *openJson needs to be bound --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 7646a39..c420d59 100644 --- a/src/index.ts +++ b/src/index.ts @@ -137,7 +137,7 @@ export default class Config { assert(fs.existsSync(dir), `Directory ${dir} does not exist`); let files = fs.readdirSync(dir).map((item) => Path.join(dir, item)); - files.forEach(this.openJson); + files.forEach(this.openJson.bind(this)); } public openJson(file: string) {