|
|
@ -148,9 +148,10 @@ export class MovieSearchComponent implements OnInit {
|
|
|
|
private updateItem(key: ISearchMovieResult, updated: ISearchMovieResult) {
|
|
|
|
private updateItem(key: ISearchMovieResult, updated: ISearchMovieResult) {
|
|
|
|
const index = this.movieResults.indexOf(key, 0);
|
|
|
|
const index = this.movieResults.indexOf(key, 0);
|
|
|
|
if (index > -1) {
|
|
|
|
if (index > -1) {
|
|
|
|
// const originalBackdrop = Object.create(this.movieResults[index]);
|
|
|
|
|
|
|
|
// this.movieResults[index] = updated;
|
|
|
|
const copy = { ...this.movieResults[index] };
|
|
|
|
// this.movieResults[index].backdropPath = originalBackdrop;
|
|
|
|
this.movieResults[index] = updated;
|
|
|
|
|
|
|
|
this.movieResults[index].background = copy.background;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
private clearResults() {
|
|
|
|
private clearResults() {
|
|
|
|