Skip to content

Commit

Permalink
Fix filtering images by location
Browse files Browse the repository at this point in the history
  • Loading branch information
Eis-D-Z committed Jul 18, 2022
1 parent 88171bd commit 0210ae1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/machines/machine-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -2146,11 +2146,10 @@ Polymer({
},

_getLocationImages(location) {
if (location && this.model && this.model.clouds)
return this.model.imagesArray.filter(
if (location && this.model && this.model.clouds && this.selectedCloud && this.model.clouds[this.selectedCloud])
return this.model.clouds[this.selectedCloud].imagesArray.filter(
im =>
im.locations &&
(!im.locations || im.locations.indexOf(location) > -1)
!im.locations || im.locations.indexOf(location) > -1
);
return [];
},
Expand Down

0 comments on commit 0210ae1

Please sign in to comment.