1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-07-16 13:55:52 +02:00

delete cipher on sync if it 404s

This commit is contained in:
Kyle Spearrin 2018-08-21 23:10:12 -04:00
parent 686597ab53
commit 46e35a9b84

View File

@ -177,7 +177,13 @@ export class SyncService implements SyncServiceAbstraction {
return this.syncCompleted(true);
}
}
} catch { }
} catch (e) {
if (e != null && e.statusCode === 404 && isEdit) {
await this.cipherService.delete(notification.id);
this.messagingService.send('syncedDeletedCipher', { cipherId: notification.id });
return this.syncCompleted(true);
}
}
}
return this.syncCompleted(false);
}