Skip to content

Commit 87c602e

Browse files
committed
Fix ready/doneEach order with async afterEach
fix #449
1 parent 9bff31d commit 87c602e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/core/render/index.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -321,15 +321,15 @@ export function Render(Base) {
321321
);
322322
}
323323

324-
this.callHook('afterEach', html, hookData =>
325-
renderMain.call(this, hookData)
326-
);
324+
this.callHook('afterEach', html, hookData => {
325+
renderMain.call(this, hookData);
326+
next();
327+
});
327328
};
328329

329330
if (this.isHTML) {
330331
html = this.result = text;
331332
callback();
332-
next();
333333
} else {
334334
prerenderEmbed(
335335
{
@@ -339,7 +339,6 @@ export function Render(Base) {
339339
tokens => {
340340
html = this.compiler.compile(tokens);
341341
callback();
342-
next();
343342
}
344343
);
345344
}

0 commit comments

Comments
 (0)