From 9755240cac3ad6bd2efd92fe92b6c6b2a95a292a Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 23 Aug 2013 18:33:52 -0400 Subject: [PATCH] Leaving the + operator as a convenience for concatenating strings When people need to serialize in a format that differentiates string concatenation from addition, they can use the new `concat` function in an expression. But I don't think we need to throw if people use `+` with strings. --- src/ol/expr/expressions.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/ol/expr/expressions.js b/src/ol/expr/expressions.js index 1f16e7ff9c..f98d595b8e 100644 --- a/src/ol/expr/expressions.js +++ b/src/ol/expr/expressions.js @@ -483,11 +483,6 @@ ol.expr.Math.prototype.evaluate = function(opt_scope, opt_fns, opt_this) { var result; var rightVal = this.right_.evaluate(opt_scope, opt_fns, opt_this); var leftVal = this.left_.evaluate(opt_scope, opt_fns, opt_this); - /** - * TODO: throw if rightVal, leftVal not numbers - this would require the use - * of a concat function for strings but it would let us serialize these as - * math functions where available elsewhere - */ var op = this.operator_; if (op === ol.expr.MathOp.ADD) {