mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Allow null in inclusion to match devel
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user