diff --git a/src/SyncGate.tsx b/src/SyncGate.tsx index fc57efb..31ff931 100644 --- a/src/SyncGate.tsx +++ b/src/SyncGate.tsx @@ -36,6 +36,7 @@ type PropsTypeInner = RouteComponentProps<{}> & PropsType & { journals: JournalsType; entries: EntriesType; userInfo: UserInfoType; + fetchCount: number; }; const syncInfoSelector = createSelector( @@ -167,8 +168,9 @@ class SyncGate extends React.PureComponent { } if ((this.props.userInfo.value === null) || (journals === null) || - (entryArrays.size === 0) || - !entryArrays.every((x: any) => (x.value !== null))) { + ((this.props.fetchCount > 0) && + ((entryArrays.size === 0) || !entryArrays.every((x: any) => (x.value !== null)))) + ) { return (); } @@ -213,6 +215,7 @@ const mapStateToProps = (state: StoreState, props: PropsType) => { journals: state.cache.journals, entries: state.cache.entries, userInfo: state.cache.userInfo, + fetchCount: state.fetchCount, }; };