From fe57000acdc215c801441973e766ba81a8c8b217 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Mon, 24 Feb 2020 11:15:08 +0000 Subject: [PATCH] bugfix - client - approotPath not passed correctly --- packages/client/src/createApp.js | 2 ++ packages/client/src/state/stateManager.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/client/src/createApp.js b/packages/client/src/createApp.js index ff409b36ed..f43a6d4c34 100644 --- a/packages/client/src/createApp.js +++ b/packages/client/src/createApp.js @@ -32,6 +32,7 @@ export const createApp = ( uiFunctions, onScreenSlotRendered: () => {}, routeTo, + appRootPath: frontendDefinition.appRootPath, }) const getAttchChildrenParams = attachChildrenParams(stateManager) screenSlotNode.props._children = [screen.props] @@ -78,6 +79,7 @@ export const createApp = ( componentLibraries, uiFunctions, onScreenSlotRendered, + appRootPath: frontendDefinition.appRootPath, // seems weird, but the routeTo variable may not be available at this point routeTo: url => routeTo(url), }) diff --git a/packages/client/src/state/stateManager.js b/packages/client/src/state/stateManager.js index 71bcbe33b5..07b3d80ded 100644 --- a/packages/client/src/state/stateManager.js +++ b/packages/client/src/state/stateManager.js @@ -23,14 +23,14 @@ const isMetaProp = propName => export const createStateManager = ({ store, coreApi, - rootPath, + appRootPath, frontendDefinition, componentLibraries, uiFunctions, onScreenSlotRendered, routeTo, }) => { - let handlerTypes = eventHandlers(store, coreApi, rootPath, routeTo) + let handlerTypes = eventHandlers(store, coreApi, appRootPath, routeTo) let currentState // any nodes that have props that are bound to the store