Skip to content

Commit

Permalink
Merge pull request #32 from mediamonks/fix-is-initializing
Browse files Browse the repository at this point in the history
Cast isInitializing to boolean
  • Loading branch information
flut1 authored Feb 4, 2019
2 parents 90acf68 + 417a7d0 commit f90469f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-redux-component-init",
"version": "1.0.0",
"version": "1.0.1",
"description": "A library to manage async cpmponent initialization in isomorphic React/Redux applications with server-side rendering",
"main": "./lib/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/withInitAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@ export default (p1, p2, p3) => {
const { __componentInitState, __initComponent, __modeInitSelf, ...props } = this.props;
const { selfInitState, isPrepared } = __componentInitState;

const isInitializing = __modeInitSelf
const isInitializing = !!(__modeInitSelf
? selfInitState === false ||
(typeof selfInitState === 'undefined' && !this.state.initializedOnce)
: (initAction && allowLazy && !isPrepared) || initActionClient;
: (initAction && allowLazy && !isPrepared) || initActionClient);

const cloak =
isInitializing &&
Expand Down

0 comments on commit f90469f

Please sign in to comment.