-2 bytes to the gzipped size and code looks a bit nicer
This wasn't landed to the compat branch though, since size would increase
with this cherry-pick
Closes gh-1856
// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
- var xml, tmp;
+ var xml;
if ( !data || typeof data !== "string" ) {
return null;
}
// Support: IE9
try {
- tmp = new DOMParser();
- xml = tmp.parseFromString( data, "text/xml" );
+ xml = ( new DOMParser() ).parseFromString( data, "text/xml" );
} catch ( e ) {
xml = undefined;
}