Nuxt/test/fixtures/basic/pages/useAsyncData/single.vue
pooya parsa 5a17458af5
fix(nuxt): use shared state for asyncData (#7055)
Co-authored-by: Ohb00 <43827372+OhB00@users.noreply.github.com>
2022-08-30 12:34:09 +02:00

17 lines
300 B
Vue

<template>
<div>
Single
<div>
{{ data }}
</div>
</div>
</template>
<script setup lang="ts">
const { data } = await useSleep()
if (data.value === null || data.value === undefined || data.value.length <= 0) {
throw new Error('Data should never be null or empty.')
}
</script>