Skip to content

Commit

Permalink
Merge pull request jashkenas#2515 from CodeFalling/safer-tostring
Browse files Browse the repository at this point in the history
safer _#toString, fix jashkenas#2498
  • Loading branch information
akre54 committed Apr 25, 2016
2 parents ce591c8 + d484f8f commit 1e68f06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1e68f06

Please sign in to comment.