From 741e1095e8c87aaf4205eeea44e54676d1066cfb Mon Sep 17 00:00:00 2001 From: "Partho P. Das" Date: Sat, 2 Mar 2019 12:42:21 +1000 Subject: [PATCH] Fixing bug #33 Applying fix from @peternycander for issue #33 as pe https://github.com/timolins/hyperlayout/issues/33#issuecomment-387126310 I have tested with latest hyper 2.1.1 on Windows 10. @timolins the pluging is not usable without this fix on Window 10. Please release. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 2c05658..bcd2886 100644 --- a/index.js +++ b/index.js @@ -159,7 +159,7 @@ exports.middleware = store => next => action => { if (type === 'SESSION_ADD_DATA') { const testedData = /^\[hyperlayout config]:(.*)/.exec(data) if (testedData && testedData[1]) { - const config = JSON.parse(testedData[1]) + const config = JSON.parse(testedData[1].substring(0, testedData[1].lastIndexOf('}') + 1)) hyperlayout = new Hyperlayout(config, store) return }