Landing pull request 382. Adds support for number values (meter,progress); Fixes #9319.

More Details:
 - https://github.com/jquery/jquery/pull/382
 - http://bugs.jquery.com/ticket/9319
This commit is contained in:
rwldrn 2011-05-20 11:03:33 -04:00 committed by timmywil
parent a1545b5079
commit f82b9dddc4
2 changed files with 31 additions and 1 deletions

View file

@ -165,7 +165,13 @@ jQuery.fn.extend({
return ret;
}
return (elem.value || "").replace(rreturn, "");
ret = elem.value;
return typeof ret === "string" ?
// handle most common string cases
ret.replace(rreturn, "") :
// handle cases where value is null/undef or number
ret == null ? "" : ret;
}
return undefined;