diff options
author | timmywil <tim.willison@thisismedium.com> | 2011-05-06 13:49:20 -0400 |
---|---|---|
committer | timmywil <tim.willison@thisismedium.com> | 2011-05-06 13:49:20 -0400 |
commit | c72b0f3256672424a193040509ed63c755c805a2 (patch) | |
tree | 91e0ec79e60df15d4cc98279feba6141686cd1d3 /src | |
parent | f7f8450041df7c250f04b03cbbcbd2d01025f379 (diff) | |
download | jquery-c72b0f3256672424a193040509ed63c755c805a2.tar.gz jquery-c72b0f3256672424a193040509ed63c755c805a2.zip |
Check empty string instead of specified as specified is inconsistent on the name attribute. Fixes #9148.
Diffstat (limited to 'src')
-rw-r--r-- | src/attributes.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/attributes.js b/src/attributes.js index c22e89b71..86f2d74a7 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -491,8 +491,8 @@ if ( !jQuery.support.getSetAttribute ) { return elem.getAttribute( name ); } ret = elem.getAttributeNode( name ); - // Return undefined if not specified instead of empty string - return ret && ret.specified ? + // Return undefined if nodeValue is empty string + return ret && ret.nodeValue !== "" ? ret.nodeValue : undefined; }, |