1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

Do not evaluate callback function when testing existence (#266)

This commit is contained in:
Matt Gibson 2021-02-08 15:55:58 -06:00 committed by GitHub
parent a4ac842cec
commit eef8a2a0f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,12 +169,12 @@ export class SendComponent implements OnInit {
this.actionPromise = this.sendService.deleteWithServer(s.id);
await this.actionPromise;
if (this.onSuccessfulDelete() != null) {
if (this.onSuccessfulDelete != null) {
this.onSuccessfulDelete();
} else {
// Default actions
this.platformUtilsService.showToast('success', null, this.i18nService.t('deletedSend'));
await this.load();
await this.refresh();
}
} catch { }
this.actionPromise = null;