]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore(server renderer): readable warn message (#2890)
authortarunama <sakeharami@gmail.com>
Tue, 10 May 2022 01:37:00 +0000 (10:37 +0900)
committerGitHub <noreply@github.com>
Tue, 10 May 2022 01:37:00 +0000 (21:37 -0400)
packages/server-renderer/src/render.ts

index 3a08163f927c979d91aecacd4ceb26f3c772adf5..17b5609f16baffd783081986494227de4c7670f1 100644 (file)
@@ -188,11 +188,8 @@ function renderComponentSubTree(
         slotScopeId
       )
     } else {
-      warn(
-        `Component ${
-          comp.name ? `${comp.name} ` : ``
-        } is missing template or render function.`
-      )
+      const componentName = comp.name || comp.__file || `<Anonymous>`
+      warn(`Component ${componentName} is missing template or render function.`)
       push(`<!---->`)
     }
   }