diff --git a/lib/less/functions.js b/lib/less/functions.js index 68d93a30..c6ab2340 100644 --- a/lib/less/functions.js +++ b/lib/less/functions.js @@ -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;