diff --git a/lib/less/tree/operation.js b/lib/less/tree/operation.js index 1ce22fb0..3c4f0939 100644 --- a/lib/less/tree/operation.js +++ b/lib/less/tree/operation.js @@ -17,6 +17,11 @@ tree.Operation.prototype.eval = function (env) { message: "Can't substract or divide a color from a number" }; } } + if (!a.operate) { + throw { name: "OperationError", + message: "Operation on an invalid type" }; + } + return a.operate(this.op, b); };