diff --git a/examples/vite.config.local.js b/examples/vite.config.local.js index 4be5afa..6f2c12b 100644 --- a/examples/vite.config.local.js +++ b/examples/vite.config.local.js @@ -1,5 +1,5 @@ import {defineConfig} from 'vite'; -import {getOcularConfig} from 'ocular-dev-tools'; +import {getOcularConfig} from '@vis.gl/dev-tools'; import {join} from 'path'; import {fileURLToPath} from 'url'; diff --git a/src/hammerjs/utils/has-parent.ts b/src/hammerjs/utils/has-parent.ts index 189ca6a..1490e16 100644 --- a/src/hammerjs/utils/has-parent.ts +++ b/src/hammerjs/utils/has-parent.ts @@ -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 = node.parentNode; + ancestor = ancestor.parentNode; } return false; }