From 9de735ecb487b82ad43f5e6d1381c85467955c14 Mon Sep 17 00:00:00 2001 From: Mike Grabowski Date: Fri, 3 Jun 2016 17:54:11 +0200 Subject: [PATCH] Fixes #97 In `jest` (test runner) and react-native environment, the assignment is going to be ignored and the `self` remains pointing to whatever react-native defined for the sake of testing. Adding missing var here. --- lib/pbxFile.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/pbxFile.js b/lib/pbxFile.js index 0215bc3..a0b2a06 100644 --- a/lib/pbxFile.js +++ b/lib/pbxFile.js @@ -165,8 +165,7 @@ function defaultGroup(fileRef) { function pbxFile(filepath, opt) { var opt = opt || {}; - - self = this; + var self = this; this.basename = path.basename(filepath); this.lastKnownFileType = opt.lastKnownFileType || detectType(filepath);