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 }