cinera_pre.js: Handle null StyleSheet.href
This commit is contained in:
parent
806c9feba8
commit
0cfa87ba84
|
@ -226,7 +226,7 @@ function GetRule(SelectorText)
|
|||
for(var StyleSheetIndex = StyleSheets.length - 1; StyleSheetIndex >= 0; --StyleSheetIndex)
|
||||
{
|
||||
var ThisSheet = StyleSheets[StyleSheetIndex];
|
||||
if(ThisSheet.href.includes(location.hostname))
|
||||
if(ThisSheet.href !== null && ThisSheet.href.includes(location.hostname))
|
||||
{
|
||||
var Rules = ThisSheet[cssRuleCode];
|
||||
for(var RuleIndex = Rules.length - 1; RuleIndex >= 0; --RuleIndex)
|
||||
|
@ -267,7 +267,7 @@ GetLocalStyleSheet()
|
|||
for(var StyleSheetIndex = StyleSheets.length - 1; StyleSheetIndex >= 0; --StyleSheetIndex)
|
||||
{
|
||||
var This = StyleSheets[StyleSheetIndex];
|
||||
if(This.href.includes(location.hostname) && !This.disabled)
|
||||
if(This.href !== null && This.href.includes(location.hostname) && !This.disabled)
|
||||
{
|
||||
Result = This;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue