Skip to content

Undefined elements returned from enumerateValues #208

@trew

Description

@trew

https://github.com/desktop/registry-js/blob/master/src/main.cc#L109
This line allocates an array of fixed size, which is then populated with values on these lines:
https://github.com/desktop/registry-js/blob/master/src/main.cc#L133:L149

Only REG_SZ, REG_EXPAND_SZ and REG_DWORD is supported.

If an unsupported value is enumerated, this produces an array in typescript that could end up looking like this:

[{ ... REG_DWORD value }, undefined, { ...REG_SZ value }]

The typings does not reflect that undefined is a possibility. Either the typings should change, or the array returned from the EnumerateValues function should not return empty values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions