Skip to content

titleTemplate is not working when titleChunk is undefined #15556

@morugetsm

Description

@morugetsm

Environment

  • Operating System: Darwin
  • Node Version: v19.1.0
  • Nuxt Version: 3.0.0
  • Nitro Version: 1.0.0
  • Package Manager: npm@8.19.3
  • Builder: vite
  • User Config: modules, runtimeConfig, vite
  • Runtime Modules: @nuxtjs/color-mode@3.1.8
  • Build Modules: -

Reproduction

use titleTemplate without title

Describe the bug

titleTemplate in useHead is working with these well.

  • nuxt.config.ts -> app.head.title
  • script -> useHead.title
  • template -> <Title/>

스크린샷 2022-11-20 오후 4 15 44

But when I remove title, page title does not change.
After refresh, 'localhost:3000/' is shown rather than default title although titleTemplate function is called.

스크린샷 2022-11-20 오후 4 15 59

I'm not certain this is a bug or not.
If I miss something, How can I print 'Title' that located on third position of optional operator in titleTemplate?

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions