Skip to content

Commit

Permalink
safer _#toString, fix jashkenas#2498
Browse files Browse the repository at this point in the history
  • Loading branch information
xcodebuild committed Apr 25, 2016
1 parent ce591c8 commit d484f8f
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 d484f8f

Please sign in to comment.