diff options
author | John Resig <jeresig@gmail.com> | 2007-07-20 19:44:15 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2007-07-20 19:44:15 +0000 |
commit | a2482e5e87558edb2be67fd6e7369bb62168fde9 (patch) | |
tree | 9e40cf0f6bc68da85fdfe26867a6f0e40b1b534c | |
parent | 42f30dd1812fc0ee262eaa43f0a354d8e439938c (diff) | |
download | jquery-a2482e5e87558edb2be67fd6e7369bb62168fde9.tar.gz jquery-a2482e5e87558edb2be67fd6e7369bb62168fde9.zip |
Added a fix for when trim receives a null value (bug #1395).
-rw-r--r-- | src/jquery/jquery.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 8e370f8ed..2f3bc02e5 100644 --- 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 ) { |