Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Commit

Permalink
Check for empty selector
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmeyers committed Dec 23, 2021
1 parent 99ba261 commit b381cb5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-embedded-note-titles",
"name": "Embedded Note Titles",
"version": "1.2.1",
"version": "1.2.2",
"minAppVersion": "0.13.8",
"description": "Inserts the note file name as an H1 heading above each note.",
"author": "mgmeyers",
Expand Down
2 changes: 1 addition & 1 deletion src/getMatchedCSSRules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export function getMatchedCSSRules(element: HTMLElement): CSSStyleRule[] {
}

// check if this element matches this rule's selector
if (element.matches(rule.selectorText)) {
if (rule.selectorText && element.matches(rule.selectorText)) {
// push the rule to the results set
result.push(rule);
}
Expand Down

0 comments on commit b381cb5

Please sign in to comment.