Skip to content

Commit 6a2ed96

Browse files
committed
♻️ refactor findParent to have default selector of '*' so it gets all parents
1 parent 76dde52 commit 6a2ed96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mnml.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const mnml = (() => {
8383
return elem.closest(selector) || null;
8484
};
8585

86-
const findParents = (elem: HTMLElement, selector: string): HTMLElement[] => {
86+
const findParents = (elem: HTMLElement, selector: string = "*"): HTMLElement[] => {
8787
const parents = [];
8888
let parent: HTMLElement | null = elem;
8989
while ((parent = parent.parentElement)) {

0 commit comments

Comments
 (0)