Skip to content

Commit

Permalink
fix(plugins/plugin-client-default): improve debug logging of client p…
Browse files Browse the repository at this point in the history
…roperties

Fixes #5088
  • Loading branch information
starpit committed Jul 6, 2020
1 parent 5fc5bfd commit b780478
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions plugins/plugin-client-common/src/components/Client/Kui.tsx
Expand Up @@ -110,7 +110,9 @@ export class Kui extends React.PureComponent<Props, State> {
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 = {
Expand Down Expand Up @@ -174,14 +176,17 @@ export class Kui extends React.PureComponent<Props, State> {
*
*/
private defaultSessionBehavior(): KuiConfiguration {
return !inBrowser()
const behavior = !inBrowser()
? {}
: {
loading: this.defaultLoading(),
reinit: this.defaultReinit(),
loadingError: this.defaultLoadingError(),
loadingDone: this.defaultLoadingDone()
}

debug('defaultSessionBehavior', behavior)
return behavior
}

private onThemeChange({ themeModel }: { themeModel: Theme }) {
Expand Down

0 comments on commit b780478

Please sign in to comment.