WICG / entries-api

Spec defining browser support for file/directory upload by drag-and-drop
https://wicg.github.io/entries-api/
Other
41 stars 9 forks source link

AsyncIterators example invalid #40

Closed inexorabletash closed 1 year ago

inexorabletash commented 1 year ago
  do {
    const entries = await getNextBatch();
    for (const entry of entries) {
      yield entry;
    }
  } while (entries.length > 0);

entries is not in scope for the while statement. Needs to be:

  let entries;
  do {
    entries = await getNextBatch();
    for (const entry of entries) {
      yield entry;
    }
  } while (entries.length > 0);