From eddc25566dc56e03d763b63ef1d57e027a63413b Mon Sep 17 00:00:00 2001 From: Isaac Grynsztein Date: Fri, 10 Apr 2020 20:49:34 -0400 Subject: [PATCH] Updated behavior of file card deletion to prevent compilation error --- src/app/file-card/file-card.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/file-card/file-card.component.ts b/src/app/file-card/file-card.component.ts index 7c3548b2..b5d3c78e 100644 --- a/src/app/file-card/file-card.component.ts +++ b/src/app/file-card/file-card.component.ts @@ -49,12 +49,14 @@ export class FileCardComponent implements OnInit { deleteFile(blacklistMode = false) { if (!this.isPlaylist) { this.postsService.deleteFile(this.uid, this.isAudio, blacklistMode).subscribe(result => { - if (result === true) { + if (result) { this.openSnackBar('Delete success!', 'OK.'); this.removeFile.emit(this.name); } else { this.openSnackBar('Delete failed!', 'OK.'); } + }, err => { + this.openSnackBar('Delete failed!', 'OK.'); }); } else { this.removeFile.emit(this.name);