Page MenuHomePhabricator

D11688.diff
No OneTemporary

D11688.diff

diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -5,7 +5,7 @@
import { Platform } from 'react-native';
import Orientation from 'react-native-orientation-locker';
import { createTransform } from 'redux-persist';
-import type { Transform } from 'redux-persist/es/types.js';
+import type { Transform, Persistor } from 'redux-persist/es/types.js';
import {
convertEntryStoreToNewIDSchema,
@@ -1259,7 +1259,7 @@
function setPersistor(persistor: *) {
storedPersistor = persistor;
}
-function getPersistor(): empty {
+function getPersistor(): Persistor {
invariant(storedPersistor, 'should be set');
return storedPersistor;
}
diff --git a/native/utils/crash-utils.js b/native/utils/crash-utils.js
--- a/native/utils/crash-utils.js
+++ b/native/utils/crash-utils.js
@@ -12,12 +12,12 @@
async function wipeAndExit() {
await Promise.all([
- getPersistor().purge(),
__DEV__ ? AsyncStorage.removeItem(navStateAsyncStorageKey) : null,
AsyncStorage.removeItem('ANDROID_REFERRER'),
AsyncStorage.removeItem(featureFlagsStorageKey),
clearSensitiveData(),
]);
+ await getPersistor().purge();
await sleep(50);
commCoreModule.terminate();
}

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 29, 4:45 PM (21 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2597506
Default Alt Text
D11688.diff (1 KB)

Event Timeline