From 6c4f077d0f377dbc1622172cf7c2692589c22a10 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 14 Dec 2017 12:06:12 +0000 Subject: [PATCH] Add missing new for records. --- src/store.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/store.tsx b/src/store.tsx index c28c9a7..28b3157 100644 --- a/src/store.tsx +++ b/src/store.tsx @@ -181,7 +181,7 @@ export const entries = handleAction( const journals = handleAction( fetchJournals, fetchTypeIdentityReducer, - JournalsFetchRecord(), + new JournalsFetchRecord(), ); const fetchCount = handleAction( @@ -236,10 +236,10 @@ const entriesSerialize = (state: FetchType) => { const entriesDeserialize = (state: EteSync.EntryJson[]): FetchType => { if (state === null) { - return EntriesFetchRecord({value: null}); + return new EntriesFetchRecord({value: null}); } - return EntriesFetchRecord({value: List(state.map((x: any) => { + return new EntriesFetchRecord({value: List(state.map((x: any) => { let ret = new EteSync.Entry(); ret.deserialize(x); return ret; @@ -268,7 +268,7 @@ const cacheDeserialize = (state: any, key: string) => { }); return Map(ret); } else if (key === 'journals') { - return JournalsFetchRecord({value: journalsDeserialize(state)}); + return new JournalsFetchRecord({value: journalsDeserialize(state)}); } return state;