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.
This commit is contained in:
Tim Schaub
2013-08-23 18:33:52 -04:00
parent 8190178fc9
commit 9755240cac

View File

@@ -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) {