Skip to content

Commit

Permalink
Spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
felixpalmer committed Dec 4, 2024
1 parent 1651730 commit 88e890c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/hammerjs/utils/has-parent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
* find if a node is in the given parent
*/
export default function hasParent(node: HTMLElement, parent: HTMLElement): boolean {
let ancester: Node | null = node;
while (ancester) {
if (ancester === parent) {
let ancestor: Node | null = node;
while (ancestor) {
if (ancestor === parent) {
return true;
}
ancester = ancester.parentNode;
ancestor = ancestor.parentNode;
}
return false;
}

0 comments on commit 88e890c

Please sign in to comment.