(id?: string)
| 557 | */ |
| 558 | export function tryUseNuxtApp (): NuxtApp | null |
| 559 | export function tryUseNuxtApp (id?: string): NuxtApp | null { |
| 560 | let nuxtAppInstance |
| 561 | if (hasInjectionContext()) { |
| 562 | nuxtAppInstance = getCurrentInstance()?.appContext.app.$nuxt |
| 563 | } |
| 564 | |
| 565 | nuxtAppInstance ||= getNuxtAppCtx(id).tryUse() |
| 566 | |
| 567 | return nuxtAppInstance || null |
| 568 | } |
| 569 | |
| 570 | /* @__NO_SIDE_EFFECTS__ */ |
| 571 | /** |
no test coverage detected
searching dependent graphs…