We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b537d42 commit ac8c06fCopy full SHA for ac8c06f
src/composables/useSnapPoints.ts
@@ -1,7 +1,7 @@
1
import { computed, type Ref } from 'vue'
2
3
export function useSnapPoints(snapPoints: Ref<number[]>, height: Ref<number>) {
4
- const sortedSnapPoints = computed(() => snapPoints.value.sort())
+ const sortedSnapPoints = computed(() => snapPoints.value.sort((a, b) => a - b))
5
6
const minSnap = computed(() => sortedSnapPoints.value[0])
7
const maxSnap = computed(() => sortedSnapPoints.value[sortedSnapPoints.value.length - 1])
0 commit comments