Skip to content

Commit

Permalink
shorter check
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisje committed Aug 23, 2015
1 parent ff50a01 commit fc1b9dc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions es5-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -1525,8 +1525,7 @@ var nxtLine = '\x85';
var wsRegexChars = '[' + ws + '][' + ws + ']*';
var trimBeginRegexp = new RegExp('^' + wsRegexChars);
var trimEndRegexp = new RegExp(wsRegexChars + '$');
var hasTrimWhitespaceBug = 'trim' in StringPrototype &&
typeof StringPrototype.trim === 'function' &&
var hasTrimWhitespaceBug = typeof StringPrototype.trim === 'function' &&
(ws.trim() !== '' || nxtLine.trim() === '');
defineProperties(StringPrototype, {
// http://blog.stevenlevithan.com/archives/faster-trim-javascript
Expand Down

0 comments on commit fc1b9dc

Please sign in to comment.