getCurrentInstance returns null after await
Vue version
3.3.7
Link to minimal reproduction
Steps to reproduce
<script setup>
import { ref, getCurrentInstance, onBeforeMount } from 'vue'
const msg = ref('Hello World!')
const do_something_sync = async () => {}
onBeforeMount(async () => {
console.log('1', getCurrentInstance())
await do_something_sync()
console.log('2', getCurrentInstance())
})
</script>
<template>
<h1>{{ msg }}</h1>
<input v-model="msg">
</template>
What is expected?
getCurrentInstance should return ComponentInternalInstance object
What is actually happening?
getCurrentInstance returns null after await
System Info
No response
Any additional comments?
No response