Skip to content

Commit

Permalink
Merge pull request #154 from KevinHoward/master
Browse files Browse the repository at this point in the history
Determine if selectorText is defined before applying toLowerCase method.
  • Loading branch information
niemyjski committed Feb 24, 2016
2 parents 2be7453 + 88e9b4c commit 5847734
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,10 @@ angular.module('dialogs.main',['dialogs.services','ngSanitize']) // requires ang
// try to find css rule .fa, in case style sheet has been concatenated
_rules = _sheets[i].cssRules;
for(var x = (_rules.length - 1);x >= 0;x--){
if(_rules[x].selectorText.toLowerCase() == '.fa'){
if(typeof(_rules[x].selectorText) === 'string' && _rules[x].selectorText.toLowerCase() === '.fa'){
dialogsProvider.useFontAwesome();
break sheetLoop; // done, exit both for loops
break sheetLoop; // done, exit both for loops

}
}
}
Expand Down

0 comments on commit 5847734

Please sign in to comment.