Skip to content

Commit

Permalink
Fix pMapIterable when accepting async values in an iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
noamokman committed Dec 26, 2023
1 parent 8e08686 commit 711aae8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -212,7 +212,7 @@ export function pMapIterable(
trySpawn();

try {
const returnValue = await mapper(value);
const returnValue = await mapper(await value);

runningMappersCount--;

Expand Down
2 changes: 1 addition & 1 deletion test.js
Expand Up @@ -8,7 +8,7 @@ import pMap, {pMapIterable, pMapSkip} from './index.js';
const sharedInput = [
[async () => 10, 300],
[20, 200],
[30, 100],
Promise.resolve([30, 100]),
];

const longerSharedInput = [
Expand Down

0 comments on commit 711aae8

Please sign in to comment.