Skip to content

Commit 22c308c

Browse files
authored
fix: limited batch splitter (#41)
1 parent 1e6a555 commit 22c308c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/template.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,9 @@ async function transformJsSnippets(expressions: Expression[], transform: (code:
368368

369369
try {
370370
// transform all snippets in a single file
371-
const batchInputSplitter = `\nsplitter(${Math.random()});\n`
371+
const batchInputSplitter = `\nsplitter(${
372+
Math.floor(Math.random() * 900_000_000) + 100_000_000
373+
});\n`
372374
const batchInput = batch
373375
.map(({ nodes, handler }) => handler.prepare(nodes[0], id))
374376
.join(batchInputSplitter)

0 commit comments

Comments
 (0)