Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit 88e9b4c

Browse files
author
Kevin Howard
committed
Changed selectorText check based on @niemyjski 's suggestion.
Instead of checking whether or not selectorText is defined, check to validate that it is a string since toLowerCase is a string method.
1 parent e4f28b5 commit 88e9b4c

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/dialogs.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -530,11 +530,10 @@ angular.module('dialogs.main',['dialogs.services','ngSanitize']) // requires ang
530530
// try to find css rule .fa, in case style sheet has been concatenated
531531
_rules = _sheets[i].cssRules;
532532
for(var x = (_rules.length - 1);x >= 0;x--){
533-
if(typeof(_rules[x].selectorText) !== 'undefined'){
534-
if(_rules[x].selectorText.toLowerCase() == '.fa'){
535-
dialogsProvider.useFontAwesome();
536-
break sheetLoop; // done, exit both for loops
537-
}
533+
if(typeof(_rules[x].selectorText) === 'string' && _rules[x].selectorText.toLowerCase() === '.fa'){
534+
dialogsProvider.useFontAwesome();
535+
break sheetLoop; // done, exit both for loops
536+
538537
}
539538
}
540539
}

0 commit comments

Comments
 (0)