Fixed #1714 by adding a default empty string if the value is falsey.
[jquery.git] / src / core.js
index ce26519..0ebc61d 100644 (file)
@@ -396,7 +396,7 @@ jQuery.fn = jQuery.prototype = {
                                        
                                // Everything else, we just grab the value
                                } else
-                                       return this[0].value.replace(/\r/g, "");
+                                       return (this[0].value || "").replace(/\r/g, "");
 
                        }