cinera_pre.js: Handle null StyleSheet.href

This commit is contained in:
Matt Mascarenhas 2021-02-13 00:00:38 +00:00
parent 806c9feba8
commit 0cfa87ba84
1 changed files with 2 additions and 2 deletions

View File

@ -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;