Skip to content

Commit 22ba8a2

Browse files
committed
fix: fix a bug which will make crash when print undefined value
1 parent d49a929 commit 22ba8a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/server/model/worker/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ export async function execWorker(
5757
requestPayload,
5858
responsePayload: result,
5959
error: error ? String(error) : undefined,
60-
logs: Array.isArray(logger) ? logger : [],
60+
logs: Array.isArray(logger)
61+
? logger.map((log) => log.map((item) => item ?? null)) // make sure log item is not undefined
62+
: [],
6163
};
6264

6365
if (workerId) {

0 commit comments

Comments
 (0)