这是indexloc提供的服务,不要输入任何密码
Skip to content

Omit type attribute when types key is empty string #86080

@alan-ws

Description

@alan-ws

Link to the code that reproduces this issue

https://github.com/alan-ws/type-attribute-not-omitted-when-types-key-is-empty-string

To Reproduce

  1. clone repo
  2. start app in local
  3. open chrome dev tools
  4. review elements in head
  5. note that tag with rel="alternate" has an empty type

Current vs. Expected behavior

CURRENT: tag with rel="alternate" has an empty type
EXPECTED: tag with rel="alternate" contains all props but the empty type is omitted

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6000
Binaries:
  Node: 23.10.0
  npm: 10.9.2
  Yarn: N/A
  pnpm: 9.11.0
Relevant Packages:
  next: 13.5.4
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 4.9.5
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Metadata

Which stage(s) are affected? (Select all that apply)

next dev (local), Vercel (Deployed)

Additional context

No response

Metadata

Metadata

Assignees

Labels

MetadataRelated to Next.js' Metadata API.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions