Supply an encodable default nothing-ish value for workerData if none given

This commit is contained in:
Tony Garnock-Jones 2018-12-13 20:17:23 +00:00
parent e43d9eb067
commit 1cb66959dd
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ function spawnWorker(workerSourceFilename, workerData) {
let endpoints = Map();
const w = new worker_threads.Worker(workerSourceFilename, {
workerData: encodePacket(workerData)
workerData: encodePacket(workerData || false)
});
w.on('error', Dataspace.wrapExternal((err) => {
throw err;