Skip to content

Commit

Permalink
docs: fix querying example route is not defined
Browse files Browse the repository at this point in the history
In the current example, route is being destructured to only use the path property, so I've replaced `route.path` with just `path` to not get a `route is not defined` error
  • Loading branch information
Jclong98 authored May 28, 2022
1 parent 41acb7c commit 893090c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/content/3.guide/2.displaying/2.querying.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ This example uses the `where()`{lang="ts"} and `only()`{lang="ts"} methods to fe
<script setup>
const { path } = useRoute()
const { data } = await useAsyncData(`content-${route.path}`, () => {
const { data } = await useAsyncData(`content-${path}`, () => {
return queryContent().where({ _path: path }).only(['title']).findOne()
})
</script>
Expand Down

0 comments on commit 893090c

Please sign in to comment.