Skip to content

Commit 2cff198

Browse files
committed
return array even for single node result
1 parent 1d3ad50 commit 2cff198

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import { parentPort, workerData } from 'worker_threads';
22
import { jsonpath } from "json-p3";
33

44
const result = jsonpath.query(workerData.expression, workerData.input);
5-
parentPort.postMessage(result.valuesOrSingular());
5+
parentPort.postMessage(result.values());
66
process.exit();

0 commit comments

Comments
 (0)