Skip to content

Commit 81dd68b

Browse files
committed
Call onTransformEnd callback after writeFiles
1 parent 8f94676 commit 81dd68b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/sourcebit.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,16 +245,16 @@ class Sourcebit {
245245
try {
246246
const data = await queue;
247247

248-
onTransformEndCallbacks.forEach(({ args, callback }) => {
249-
callback({ ...args, data });
250-
});
251-
252248
finishTransform();
253249

254250
if (Array.isArray(data.files)) {
255251
await this.writeFiles(data.files);
256252
}
257253

254+
onTransformEndCallbacks.forEach(({ args, callback }) => {
255+
callback({ ...args, data });
256+
});
257+
258258
if (typeof this.onTransform === "function") {
259259
this.onTransform(null, data);
260260
}

0 commit comments

Comments
 (0)