Skip to content

Commit

Permalink
Fixes nodevalue deprecation (with appropriate fallbacks). See jamieho…
Browse files Browse the repository at this point in the history
  • Loading branch information
brandoncarl committed Apr 7, 2015
1 parent eb58086 commit 550c914
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jquery.country-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ THE SOFTWARE.
var attrs = {};
var raw_attrs = context.$select_field[0].attributes;
for (var i=0; i < raw_attrs.length; i++) {
var key = raw_attrs[i].nodeName;
var value = raw_attrs[i].nodeValue;
var key = raw_attrs[i].name || raw_attrs[i].nodeName;
var value = raw_attrs[i].value || raw_attrs[i].nodeValue;
if ( key !== 'name' && key !== 'id' && typeof context.$select_field.attr(key) !== 'undefined' ) {
attrs[key] = value;
}
Expand Down

0 comments on commit 550c914

Please sign in to comment.