Skip to content

Commit 70d1e49

Browse files
committed
don't show the loading animation when src is set to null
1 parent e40a44c commit 70d1e49

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
@@ -175,11 +175,11 @@ export class ThumbnailComponent implements OnChanges {
175175
// isLoading$ will be set to false by the error or success handler afterwards, except in the
176176
// case where src is null, then we have to set it manually here (because those handlers won't
177177
// trigger)
178-
if (this.isLoading$.getValue() === false) {
178+
if (src !== null && this.isLoading$.getValue() === false) {
179179
this.isLoading$.next(true);
180180
}
181181
this.src$.next(src);
182-
if (src === null) {
182+
if (src === null && this.isLoading$.getValue() === true) {
183183
this.isLoading$.next(false);
184184
}
185185
}

0 commit comments

Comments
 (0)