From b7804781e4b24ec98f23a23d10fc85b97361f383 Mon Sep 17 00:00:00 2001 From: Nick Mitchell Date: Mon, 6 Jul 2020 15:59:07 -0400 Subject: [PATCH] fix(plugins/plugin-client-default): improve debug logging of client properties Fixes #5088 --- .../plugin-client-common/src/components/Client/Kui.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/plugin-client-common/src/components/Client/Kui.tsx b/plugins/plugin-client-common/src/components/Client/Kui.tsx index 9b6333a0df7..c6031fc6020 100644 --- a/plugins/plugin-client-common/src/components/Client/Kui.tsx +++ b/plugins/plugin-client-common/src/components/Client/Kui.tsx @@ -110,7 +110,9 @@ export class Kui extends React.PureComponent { this.state = Object.assign({}, this.defaultSessionBehavior(), this.defaultFeatureFlag(), props, { isBootstrapped: !!props.noBootstrap }) - debug('initial state', this.state) + debug('initial state:inBrowser?', inBrowser()) + debug('initial state:given properties', props) + debug('initial state:final value', this.state) } catch (err) { console.log('using default configuration') this.state = { @@ -174,7 +176,7 @@ export class Kui extends React.PureComponent { * */ private defaultSessionBehavior(): KuiConfiguration { - return !inBrowser() + const behavior = !inBrowser() ? {} : { loading: this.defaultLoading(), @@ -182,6 +184,9 @@ export class Kui extends React.PureComponent { loadingError: this.defaultLoadingError(), loadingDone: this.defaultLoadingDone() } + + debug('defaultSessionBehavior', behavior) + return behavior } private onThemeChange({ themeModel }: { themeModel: Theme }) {