Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3383577
D11688.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11688.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D11688: [native] Purge the store after clearing the DB
Attached
Detach File
Event Timeline
Log In to Comment