diff --git a/packages/spacebars/spacebars-runtime.js b/packages/spacebars/spacebars-runtime.js index 254c1f05a4..f260a4a8e2 100644 --- a/packages/spacebars/spacebars-runtime.js +++ b/packages/spacebars/spacebars-runtime.js @@ -1,7 +1,10 @@ Spacebars.include2 = function (templateOrFunction, dataFunc, contentFunc, elseFunc) { var template = Spacebars.call(templateOrFunction); + if (template === null) + return null; + if (! (template instanceof Blaze.Component)) - throw new Error("Expected template, found: " + template); + throw new Error("Expected template or null, found: " + template); return new template.constructor(dataFunc, contentFunc, elseFunc); };