Skip to content

[JS] Getter function for singular message fields #81

Open
@mirzazadeh

Description

@mirzazadeh

Getter function for singular message fields in javascript returns "undefined" when the field is not set. This is not consistent with the behavior of getter function for such fields in all other languages.

This is very inconvenient and is a source of bugs because programmer has always check for undefined values for nested messages (imagine multi levels of nested submessages). It can be fixed by introducing new getter function like msg.GetFooOrDefault().

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