From 7fc12014f281fa23b3757faff0d579930a51c335 Mon Sep 17 00:00:00 2001 From: deviprsd21 Date: Sun, 12 Jan 2014 10:47:55 +0530 Subject: [PATCH] Error handlers for min/max functions --- lib/less/functions.js | 3 +++ 1 file changed, 3 insertions(+) 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;