mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Only invoke callback once in case of an error
This commit is contained in:
parent
8706e582ed
commit
adc46efc65
@ -82,7 +82,7 @@ Template.prototype = {
|
||||
callback(null, out.getOutput());
|
||||
});
|
||||
|
||||
out.on('error', callback);
|
||||
out.once('error', callback);
|
||||
} else if (!out || !out.isAsyncWriter) {
|
||||
var stream = out;
|
||||
// Assume the "out" is really a stream
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user