Skip to content

Async values in arrays are not being handled properly #876

@jdmarshall

Description

@jdmarshall

Another issue caught by CodeRabbit:

Promises inside arrays are silently skipped by _iterate.

When property.constructor === Array (line 360), property.forEach(_iterate) passes each array element to _iterate as prop. For a Promise element, Object.keys(prop) returns [] (Promises have no enumerable own properties), so the inner forEach at line 355 never executes — the instanceof Promise check at line 362 is never reached for that element.

This differs from resolveDeferredConfigs (lines 311–318), which explicitly checks if (entry instanceof DeferredConfig) within array iteration, demonstrating the correct pattern.

Additionally, Promise.all(promises) at line 371 awaits the promises but doesn't write resolved values back into the config object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions