Skip to content

Commit c222c44

Browse files
committed
don't show the loading animation when src is set to null
1 parent a7bcddf commit c222c44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/thumbnail/thumbnail.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,11 @@ export class ThumbnailComponent implements OnChanges {
198198
// isLoading$ will be set to false by the error or success handler afterwards, except in the
199199
// case where src is null, then we have to set it manually here (because those handlers won't
200200
// trigger)
201-
if (this.isLoading$.getValue() === false) {
201+
if (src !== null && this.isLoading$.getValue() === false) {
202202
this.isLoading$.next(true);
203203
}
204204
this.src$.next(src);
205-
if (src === null) {
205+
if (src === null && this.isLoading$.getValue() === true) {
206206
this.isLoading$.next(false);
207207
}
208208
}

0 commit comments

Comments
 (0)