From ef0b0f8fcf0619b5b9df62ac1a52034f537df2b5 Mon Sep 17 00:00:00 2001 From: Jason Mulligan <jason.mulligan@avoidwork.com> Date: Sun, 12 Mar 2017 21:32:58 -0400 Subject: [PATCH] Missed a 0 padding `JSON.stringify()` --- lib/index.js | 2 +- package.json | 2 +- src/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/index.js b/lib/index.js index 5436222..8e8be32 100644 --- a/lib/index.js +++ b/lib/index.js @@ -64,7 +64,7 @@ var Worker = function () { }, { key: "postMessage", value: function postMessage(msg) { - this.child.send(JSON.stringify({ data: msg })); + this.child.send(JSON.stringify({ data: msg }, null, 0)); } }, { key: "terminate", diff --git a/package.json b/package.json index 31a2613..f5bc450 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tiny-worker", - "version": "2.0.2", + "version": "2.0.3", "description": "Tiny WebWorker for Server", "main": "lib/index.js", "scripts": { diff --git a/src/index.js b/src/index.js index b024d6e..d3de037 100644 --- a/src/index.js +++ b/src/index.js @@ -48,7 +48,7 @@ class Worker { } postMessage (msg) { - this.child.send(JSON.stringify({data: msg})); + this.child.send(JSON.stringify({data: msg}, null, 0)); } terminate () { -- GitLab