[FIX] getSettings not catching errors (#2271)
This commit is contained in:
parent
aef7125887
commit
f3b02a6a88
|
@ -1,4 +1,3 @@
|
||||||
import { InteractionManager } from 'react-native';
|
|
||||||
import { sanitizedRaw } from '@nozbe/watermelondb/RawRecord';
|
import { sanitizedRaw } from '@nozbe/watermelondb/RawRecord';
|
||||||
import { Q } from '@nozbe/watermelondb';
|
import { Q } from '@nozbe/watermelondb';
|
||||||
|
|
||||||
|
@ -132,7 +131,7 @@ export default async function() {
|
||||||
const filteredSettingsIds = filteredSettings.map(s => s._id);
|
const filteredSettingsIds = filteredSettings.map(s => s._id);
|
||||||
|
|
||||||
reduxStore.dispatch(addSettings(this.parseSettings(filteredSettings)));
|
reduxStore.dispatch(addSettings(this.parseSettings(filteredSettings)));
|
||||||
InteractionManager.runAfterInteractions(async() => {
|
|
||||||
// filter server info
|
// filter server info
|
||||||
const serverInfo = filteredSettings.filter(i1 => serverInfoKeys.includes(i1._id));
|
const serverInfo = filteredSettings.filter(i1 => serverInfoKeys.includes(i1._id));
|
||||||
const iconSetting = data.find(item => item._id === 'Assets_favicon_512');
|
const iconSetting = data.find(item => item._id === 'Assets_favicon_512');
|
||||||
|
@ -174,7 +173,6 @@ export default async function() {
|
||||||
}
|
}
|
||||||
return allRecords.length;
|
return allRecords.length;
|
||||||
});
|
});
|
||||||
});
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log(e);
|
log(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue