fix: only trigger change from button

This commit is contained in:
GitButler 2025-06-30 00:11:36 +05:30 committed by Smit
parent 1f4d260c6a
commit abce214ced

View file

@ -12,7 +12,7 @@
function setValue(event: MouseEvent) { function setValue(event: MouseEvent) {
const element = event.target as HTMLDivElement; const element = event.target as HTMLDivElement;
const button = element.parentElement; const button = element.parentElement;
if (button) { if (button instanceof HTMLButtonElement) {
let position = button.dataset.position! as ReferencePoint; let position = button.dataset.position! as ReferencePoint;
onvalue?.(position); onvalue?.(position);
} }