git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42f30dd
)
Added a fix for when trim receives a null value (bug #1395).
author
John Resig
<jeresig@gmail.com>
Fri, 20 Jul 2007 19:44:15 +0000
(19:44 +0000)
committer
John Resig
<jeresig@gmail.com>
Fri, 20 Jul 2007 19:44:15 +0000
(19:44 +0000)
src/jquery/jquery.js
patch
|
blob
|
history
diff --git
a/src/jquery/jquery.js
b/src/jquery/jquery.js
index
8e370f8
..
2f3bc02
100644
(file)
--- a/
src/jquery/jquery.js
+++ b/
src/jquery/jquery.js
@@
-1607,7
+1607,7
@@
jQuery.extend({
* @cat JavaScript
*/
trim: function(t){
- return t.replace(/^\s+|\s+$/g, "");
+ return (t||"").replace(/^\s+|\s+$/g, "");
},
makeArray: function( a ) {