Error handlers for min/max functions

This commit is contained in:
deviprsd21
2014-01-12 10:47:55 +05:30
parent b77b02091a
commit 7fc12014f2

View File

@@ -281,6 +281,9 @@ tree.functions = {
values[unit] = values[""] !== undefined && unit !== "" && unit === unitStatic ? values[""] : values[unit];
j = values[unit];
if (j === undefined) {
if(unitStatic !== undefined && unit !== unitStatic) {
throw{ type: "Argument", message: "incompatible types" };
}
values[unit] = order.length;
order.push(current);
continue;