diff --git a/runtime/marko-runtime.js b/runtime/marko-runtime.js index 2eb258af5..7ff47ea98 100644 --- a/runtime/marko-runtime.js +++ b/runtime/marko-runtime.js @@ -76,7 +76,7 @@ Template.prototype = { out = new AsyncWriter(out); shouldEnd = true; } - + out.on('finish', function() { callback(null, out.getOutput()); }); @@ -155,6 +155,10 @@ if (stream) { } function load(templatePath) { + if (!templatePath) { + throw new Error('"templatePath" is required'); + } + var template; if (typeof templatePath === 'string') {