-
Notifications
You must be signed in to change notification settings - Fork 507
Async values in arrays are not being handled properly #876
Copy link
Copy link
Closed
Milestone
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels