From f1776e03098c1a4381242006ecb415e184b50faf Mon Sep 17 00:00:00 2001 From: Zalmoxisus Date: Tue, 1 Mar 2016 12:06:21 +0200 Subject: [PATCH] Support non-JSON values Related to #60 and https://github.com/kolodny/jsan/issues/1 --- package.json | 2 +- src/browser/extension/inject/pageScript.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index d5db9a0a..ff8b34ce 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ }, "dependencies": { "crossmessaging": "^0.2.0", - "jsan": "^2.0.4", + "jsan": "^3.0.0", "react": "^0.14.6", "react-dom": "^0.14.6", "react-icons": "^1.0.3", diff --git a/src/browser/extension/inject/pageScript.js b/src/browser/extension/inject/pageScript.js index 9daee95a..487c800e 100644 --- a/src/browser/extension/inject/pageScript.js +++ b/src/browser/extension/inject/pageScript.js @@ -12,8 +12,8 @@ window.devToolsExtension = function(config = {}) { let errorOccurred = false; function relaySerialized(message) { - message.payload = stringify(message.payload); - if (message.action !== '') message.action = stringify(message.action); + message.payload = stringify(message.payload, null, null, true); + if (message.action !== '') message.action = stringify(message.action, null, null, true); window.postMessage(message, '*'); }