introduce asynchronicity to ensure we get a new context

This commit is contained in:
Conduitry 2018-04-28 23:43:56 -04:00
parent 9f7e347cab
commit e47cba7d39
1 changed files with 2 additions and 0 deletions

View File

@ -298,6 +298,7 @@ export default class Defiler {
// call the transform on a file with the given event string, and handle errors
async [_callTransform](file, event) {
await null
context.create(file.path);
try {
await this[_transform]({ file, event });
@ -312,6 +313,7 @@ export default class Defiler {
async [_processGenerator](symbol) {
this[_active].add(symbol);
const generator = this[_generators].get(symbol);
await null
context.create(symbol);
try {
await generator();