Make file resolving non-blocking for local paths

This commit is contained in:
Amish Shah
2016-08-29 19:08:31 +01:00
parent 897cbfec77
commit 78e0d88f55
2 changed files with 7 additions and 2 deletions

View File

@@ -195,7 +195,12 @@ class ClientDataResolver {
return reject(new Error(`The file could not be found: ${file}`));
}
return resolve(fs.readFileSync(file));
fs.readFile(file, (err, data) => {
if (err) {
return reject(err);
}
resolve(data);
});
}
});
}