Skip to content

Commit b4f9b1a

Browse files
committed
fix(build): avoid unnecessary error
1 parent 6c34cb8 commit b4f9b1a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/nuxi/src/commands/build.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ export default defineCommand({
6767
try {
6868
// Use ? for backward compatibility for Nuxt <= RC.10
6969
nitro = kit.useNitro?.()
70-
logger.info(`Building for Nitro preset: \`${nitro.options.preset}\``)
70+
if (nitro) {
71+
logger.info(`Building for Nitro preset: \`${nitro.options.preset}\``)
72+
}
7173
}
7274
catch {
7375
//

0 commit comments

Comments
 (0)