From adc46efc655992d902cecc895b3d9bfe5b44db9e Mon Sep 17 00:00:00 2001 From: Patrick Steele-Idem Date: Thu, 6 Nov 2014 13:32:44 -0700 Subject: [PATCH] Only invoke callback once in case of an error --- runtime/marko-runtime.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/marko-runtime.js b/runtime/marko-runtime.js index 57185e74c..f64e3d81d 100644 --- a/runtime/marko-runtime.js +++ b/runtime/marko-runtime.js @@ -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