From fc1b9dca7bffe5e54f56e5678dacb303c7193532 Mon Sep 17 00:00:00 2001 From: James Edward Lewis II Date: Sun, 23 Aug 2015 11:46:18 +0100 Subject: [PATCH] shorter check --- es5-shim.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/es5-shim.js b/es5-shim.js index 41c9f93d..041e491b 100644 --- a/es5-shim.js +++ b/es5-shim.js @@ -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