From f40fd5a7d60663f0d1f593a913d966382280d716 Mon Sep 17 00:00:00 2001 From: Juriy Zaytsev Date: Thu, 12 Nov 2009 21:15:52 -0500 Subject: [PATCH] Remove redundant ternary. --- CHANGELOG | 2 ++ src/lang/string.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 10548fe..f762443 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Remove redundant ternary. (kangax) + * Avoid repeating declaration statements where it makes sense, for slightly better runtime performance and minification. (kangax) * Make `Event.stopObserving` return element in all cases. [#810 state:resolved] (Yaffle, Tobie Langel) diff --git a/src/lang/string.js b/src/lang/string.js index 28b3f22..e43aa79 100644 --- a/src/lang/string.js +++ b/src/lang/string.js @@ -483,7 +483,7 @@ Object.extend(String.prototype, (function() { truncate: truncate, // Firefox 3.5+ supports String.prototype.trim // (`trim` is ~ 5x faster than `strip` in FF3.5) - strip: String.prototype.trim ? String.prototype.trim : strip, + strip: String.prototype.trim || strip, stripTags: stripTags, stripScripts: stripScripts, extractScripts: extractScripts,