Skip to content

Map fields with empty string as key are handled incorrectly #843

@mkosieradzki

Description

@mkosieradzki

protobuf.js version: 6.8.0

UPDATED:
Current codegen for map-fields when string key is empty is incorrect.

ORIGINAL:
Current codegen for map-fields is invalid. It assumes that map keys are non empty (!) strings (!!).

  1. Map CAN have empty string as indices.
  2. Map CAN be indexed by something different than string...

Both parsing and JS representation (Object instead of Map) are broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions