Skip to content

Commit bd3f253

Browse files
committed
Merge pull request #48 from joeybaker/fix-tokens-by-file-race-condition
fix a race-condition with tokensByFile
2 parents cde1b19 + db193d5 commit bd3f253

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,9 @@ module.exports = function (browserify, options) {
152152
// collect visited filenames
153153
filenames.push(filename);
154154

155+
var loader = new FileSystemLoader(rootDir, plugins);
155156
return through(function noop () {}, function end () {
156157
var self = this;
157-
var loader = new FileSystemLoader(rootDir, plugins);
158-
159-
// pre-populate the loader's tokensByFile
160-
loader.tokensByFile = tokensByFile;
161158

162159
loader.fetch(path.relative(rootDir, filename), '/').then(function (tokens) {
163160
var output = 'module.exports = ' + JSON.stringify(tokens);

0 commit comments

Comments
 (0)