diff --git a/lib/reducers/thread-reducer.js b/lib/reducers/thread-reducer.js --- a/lib/reducers/thread-reducer.js +++ b/lib/reducers/thread-reducer.js @@ -50,12 +50,8 @@ import { actionLogger } from '../utils/action-logger'; import { setNewSessionActionType } from '../utils/action-utils'; import { getConfig } from '../utils/config'; -import { isDev } from '../utils/dev-utils'; -import { assertObjectsAreEqual } from '../utils/objects'; import { sanitizeActionSecrets } from '../utils/sanitization'; -const PROCESSED_THREAD_STORE_INVARIANTS_DISABLED = !isDev; - function reduceThreadUpdates( threadInfos: { +[id: string]: RawThreadInfo }, payload: { @@ -527,23 +523,4 @@ return { ...threadStore, threadInfos: processedThreads }; } -function assertThreadStoreThreadsAreEqual( - processedThreadStore: ThreadStore, - expectedThreadStore: ThreadStore, - actionType: string, -) { - if (PROCESSED_THREAD_STORE_INVARIANTS_DISABLED) { - return; - } - assertObjectsAreEqual( - processedThreadStore.threadInfos, - expectedThreadStore.threadInfos, - `ThreadStore.threadInfos - ${actionType}`, - ); -} - -export { - reduceThreadInfos, - processThreadStoreOperations, - assertThreadStoreThreadsAreEqual, -}; +export { reduceThreadInfos, processThreadStoreOperations };