Skip to content

Commit

Permalink
fix(dev): chain catch correctly on promise
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Dec 23, 2024
1 parent d59f9f5 commit 4504a4c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/utils/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,7 @@ class NuxtDevServer extends EventEmitter {
const loadingTemplate
= this.options.loadingTemplate
|| this._currentNuxt?.options.devServer.loadingTemplate
|| (
await importModule('@nuxt/ui-templates', this.options.cwd).then(
r => r.loading,
)
).catch(() => {})
|| await importModule('@nuxt/ui-templates', this.options.cwd).then(r => r.loading).catch(() => {})
|| ((params: { loading: string }) => `<h2>${params.loading}</h2>`)
res.end(
loadingTemplate({
Expand Down

0 comments on commit 4504a4c

Please # to comment.