Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions packages/data/src/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,8 @@ export function toAsyncIterable( object ) {
object = [ object ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: The comment preceding the condition reads as a continuation which was previously continued as "...of Promises", now removed. This could be rewritten as a plain "Normalize as iterable"

}

for ( let maybeAction of object ) {
// ...of Promises.
if ( ! ( maybeAction instanceof Promise ) ) {
maybeAction = Promise.resolve( maybeAction );
}

yield await maybeAction;
for ( const maybeAction of object ) {
yield maybeAction;
}
}() );
}
Expand Down