From d484f8ff4486c6894684af2bbbb0834a38d69674 Mon Sep 17 00:00:00 2001 From: codefalling Date: Mon, 25 Apr 2016 17:19:25 +0800 Subject: [PATCH] safer _#toString, fix #2498 --- underscore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/underscore.js b/underscore.js index 84713e688..ab2f75f36 100644 --- a/underscore.js +++ b/underscore.js @@ -1608,7 +1608,7 @@ _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; _.prototype.toString = function() { - return '' + this._wrapped; + return String(this._wrapped); }; // AMD registration happens at the end for compatibility with AMD loaders