Skip to content

Commit 9b9f369

Browse files
committed
Use async import of p-map to make it work with CJS
1 parent e428ed8 commit 9b9f369

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sql-cursor-pagination.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pMap from 'p-map';
21
import { notNull } from './assert';
32
import { RawCursor, buildCursor, encryptCursor, resolveCursor } from './cursor';
43
import { CursorSecret } from './cursor-secret';
@@ -462,6 +461,7 @@ async function _withPagination<
462461
: false;
463462

464463
const seenCursors: Set<string> = new Set();
464+
const { default: pMap } = await import('p-map');
465465
const edgesWithRawCursor: _WithPaginationResultEdge<TNode, boolean, true>[] =
466466
await pMap(
467467
lastNodes,

0 commit comments

Comments
 (0)