Skip to content

Commit

Permalink
fix(nuxi): backward compatibility for kit <= rc.10 without useNitro (
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Sep 16, 2022
1 parent 43d1eac commit 2b57bfe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/nuxi/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export default defineNuxtCommand({
}
})

const nitro = useNitro()
// Use ? for backward compatibility for Nuxt <= RC.10
const nitro = useNitro?.()

await clearDir(nuxt.options.buildDir)

Expand Down

0 comments on commit 2b57bfe

Please sign in to comment.