Skip to content

Commit

Permalink
fix: uncrypto works on https and localhost only
Browse files Browse the repository at this point in the history
  • Loading branch information
zernonia committed Dec 18, 2024
1 parent 4ac8505 commit 47bad41
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@
"@vueuse/shared": "^12.0.0",
"aria-hidden": "^1.2.4",
"defu": "^6.1.4",
"ohash": "^1.1.4",
"uncrypto": "^0.1.3"
"ohash": "^1.1.4"
},
"devDependencies": {
"@iconify/vue": "^4.1.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/shared/useBodyScrollLock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { type Fn, isClient, isIOS, tryOnBeforeUnmount } from '@vueuse/shared'
import { computed, nextTick, ref, watch } from 'vue'
import { defu } from 'defu'
import { injectConfigProviderContext } from '@/ConfigProvider/ConfigProvider.vue'
import { randomUUID } from 'uncrypto'
import { useId } from './useId'

const useBodyLockStackCount = createSharedComposable(() => {
const map = ref<Map<string, boolean>>(new Map())
Expand Down Expand Up @@ -89,7 +89,7 @@ const useBodyLockStackCount = createSharedComposable(() => {
})

export function useBodyScrollLock(initialState?: boolean | undefined) {
const id = randomUUID()
const id = useId()
const map = useBodyLockStackCount()

map.value.set(id, initialState ?? false)
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 47bad41

Please sign in to comment.