diff --git a/docs/3.api/4.advanced/2.kit.md b/docs/3.api/4.advanced/2.kit.md index 5d3950ff88..b2a6db5c0e 100644 --- a/docs/3.api/4.advanced/2.kit.md +++ b/docs/3.api/4.advanced/2.kit.md @@ -993,7 +993,7 @@ An object with the following properties: When you're working with the `setup` function in Nuxt modules, Nuxt is already provided as the second argument. This means you can directly utilize it without needing to call `useNuxt()`. However, if you want to access Nuxt from other functions, then you can use `useNuxt()` or `tryUseNuxt()`. You can look at [Nuxt Site Config](https://github.com/harlan-zw/nuxt-site-config) as an example of usage. :: -### `useNuxt()` +### `useNuxt` Get the Nuxt instance from the context. It will throw an error if Nuxt is not available. @@ -1050,7 +1050,7 @@ export default defineNuxtModule({ :: -### `tryUseNuxt()` +### `tryUseNuxt` Get the Nuxt instance from the context. It will return `null` if Nuxt is not available.