Skip to content

Commit

Permalink
Fixed bug with classlist being null
Browse files Browse the repository at this point in the history
Issue was occuring where the el.classList.add function was undefined.
  • Loading branch information
andrewharry committed Jun 19, 2015
1 parent a293a23 commit c9c8218
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions release/js/ionic-angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ jqLite.prototype.addClass = function(cssClasses) {
el = this[x];
if (el.setAttribute) {

if (cssClasses.indexOf(' ') < 0 && el.classList.add) {
if (cssClasses.indexOf(' ') < 0 && el.classList && el.classList.add) {
el.classList.add(cssClasses);
} else {
existingClasses = (' ' + (el.getAttribute('class') || '') + ' ')
Expand Down Expand Up @@ -13335,4 +13335,4 @@ IonicModule
};
});

})();
})();

0 comments on commit c9c8218

Please sign in to comment.