Marko v3: Better type handling in makeNode()

This commit is contained in:
Patrick Steele-Idem 2016-02-10 16:20:49 -07:00
parent 530b8eb3ef
commit 5ee4d8fc97

View File

@ -56,8 +56,10 @@ function makeNode(arg) {
return parseExpression(arg, DEFAULT_BUILDER);
} else if (arg instanceof Node) {
return arg;
} else {
} else if (arg == null) {
return undefined;
} else {
throw new Error('Argument should be a string or Node or null. Actual: ' + arg);
}
}