Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit aff6aba

Browse files
committed
fix: fallback to .then
1 parent ba8bfd2 commit aff6aba

File tree

4 files changed

+431
-420
lines changed

4 files changed

+431
-420
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@
4747
"dependencies": {
4848
"@babel/cli": "^7.12.8",
4949
"@babel/core": "^7.12.9",
50-
"@babel/plugin-transform-runtime": "^7.15.0",
51-
"@babel/preset-env": "^7.12.7",
50+
"@babel/preset-env": "^7.15.0",
5251
"@babel/preset-typescript": "^7.12.7",
5352
"@chakra-ui/styled-system": "^1.10.0",
5453
"@chakra-ui/utils": "1.8.2",

packages/c-popper/src/use-popper.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function usePopper(props: UsePopperOptions = {}) {
5656
unsubscribe?.()
5757
})
5858

59-
const setup = async () => {
59+
const setup = () => {
6060
nextTick().then(() => {
6161
if (!reference.value || !popper.value) return
6262
cleanup.value?.()
@@ -78,8 +78,7 @@ export function usePopper(props: UsePopperOptions = {}) {
7878
popper.value = null
7979
})
8080

81-
onMounted(async () => {
82-
await nextTick()
81+
onMounted(() => {
8382
nextTick().then(() => {
8483
unsubscribe = watch(() => [reference, popper], setup, {
8584
immediate: true,

tests/support.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import Chakra, { chakra, extendTheme } from '@chakra-ui/vue-next'
88
import { domElements, injectGlobal, toCSSVar } from '@chakra-ui/vue-system'
99
import { CReset } from '@chakra-ui/c-reset'
1010
import 'cypress-plugin-tab'
11-
import "@babel/polyfill"
1211

1312
const theme = extendTheme({})
1413

0 commit comments

Comments
 (0)