Skip to content

Serializer also serializes properties in object prototype #31

Open
@luisgabrielroldan

Description

@luisgabrielroldan

Looks like a for loop is used for iterating the properties in the objects

for (let key in data) {
	if (data[key] !== undefined) {
		length++;
	}
}

This also iterates the properties defined in prototypes which I don't think is an expected behaviour.

The current typescript version of msgpack is using Object.keys that does not returns those properties.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions