diff --git a/native/redux/client-db-utils.js b/native/redux/client-db-utils.js --- a/native/redux/client-db-utils.js +++ b/native/redux/client-db-utils.js @@ -6,6 +6,7 @@ RawThreadInfo, ThreadStoreThreadInfos, } from 'lib/types/thread-types.js'; +import { values } from 'lib/utils/objects.js'; import { convertClientDBThreadInfoToRawThreadInfo, convertRawThreadInfoToClientDBThreadInfo, @@ -37,9 +38,9 @@ migrationFunc(threadIDToThreadInfo); // 5. Convert the updated `threadInfo`s back into an array. - const updatedRawThreadInfos: $ReadOnlyArray = Object.keys( + const updatedRawThreadInfos: $ReadOnlyArray = values( updatedThreadIDToThreadInfo, - ).map(id => updatedThreadIDToThreadInfo[id]); + ); // 6. Translate `RawThreadInfo`s to `ClientDBThreadInfo`s. const convertedClientDBThreadInfos: $ReadOnlyArray =