We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f37156 commit c376140Copy full SHA for c376140
src/runtime/internal/app.ts
@@ -34,7 +34,7 @@ declare global {
34
}
35
36
export function useNitroApp(): NitroApp {
37
- return ((useNitroApp as any).__instance__ ??= initNitroApp());
+ return (globalThis.__nitro__ ??= initNitroApp());
38
39
40
export function useNitroHooks(): HookableCore<NitroRuntimeHooks> {
@@ -83,7 +83,7 @@ export function fetch(
83
84
85
function initNitroApp(): NitroApp {
86
- const nitroApp = createNitroApp();
+ const nitroApp = (globalThis.__nitro__ = createNitroApp());
87
if (hasPlugins) {
88
for (const plugin of plugins) {
89
try {
@@ -96,7 +96,6 @@ function initNitroApp(): NitroApp {
96
97
98
99
- globalThis.__nitro__ = nitroApp;
100
return nitroApp;
101
102
0 commit comments