Skip to content

Commit 030732e

Browse files
ryan-williamsclaude
andcommitted
fix(snap): import findSnap into useDragElements (snap threw at runtime)
`e9a5cc8e` extracted the snap math to `snap.ts` and *re-exported* `findSnap` (`export { findSnap } from './snap'`) but never imported it for local use, while `applySnap` calls it. A re-export creates no local binding, so every drag that reached `applySnap` threw `ReferenceError: findSnap is not defined` — snap-to guides were silently broken in the dev editor. Add `findSnap` to the local import (the re-export stays for external callers). Surfaced by the rewritten v-drag E2E. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 6d33f3a commit 030732e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/client/composables/useDragElements.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { directiveInject } from '../utils'
99
// `getVisibleBounds`, `findSnap`, `SNAP_THRESHOLD` moved to `./snap.ts` so the
1010
// snap math is unit-testable without a Vue runtime / vite virtual modules.
1111
// Re-exported below for callers that already import them from this module.
12-
import { getVisibleBounds } from './snap'
12+
import { findSnap, getVisibleBounds } from './snap'
1313
import {
1414
discardTopMatching,
1515
beginEdit as historyBeginEdit,

0 commit comments

Comments
 (0)