Skip to content

Commit 4504a4c

Browse files
committed
fix(dev): chain catch correctly on promise
1 parent d59f9f5 commit 4504a4c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/utils/dev.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,7 @@ class NuxtDevServer extends EventEmitter {
123123
const loadingTemplate
124124
= this.options.loadingTemplate
125125
|| this._currentNuxt?.options.devServer.loadingTemplate
126-
|| (
127-
await importModule('@nuxt/ui-templates', this.options.cwd).then(
128-
r => r.loading,
129-
)
130-
).catch(() => {})
126+
|| await importModule('@nuxt/ui-templates', this.options.cwd).then(r => r.loading).catch(() => {})
131127
|| ((params: { loading: string }) => `<h2>${params.loading}</h2>`)
132128
res.end(
133129
loadingTemplate({

0 commit comments

Comments
 (0)