fix: 🐛 auth-methods deleted items are showing on table view (#2244)

* fix: 🐛 auth-methods deleted items are showing on table view
This commit is contained in:
Lisbet Alvarez authored and GitHub committed 2024-04-15 16:30:43 -07:00
1 parent adc50a939f
commit a43756895d
1 file changed
+6
@@ -102,6 +102,12 @@ export default class IndexedDbHandler {
if (payload.removed_ids?.length > 0) {
await indexedDb[type].bulkDelete(payload.removed_ids);
}
// This is a temporary fix of clearing the DB (specifically for auth-methods)
// since we are not storing the token we do not get back a list of removed_ids
// from the API call and we do not want deleted items from showing in list view.
if (!storeToken) {
await indexedDb[type].clear();
}
const normalizedPayload = serializer.normalizeResponse(
store,