diff --git a/src/machines/machine-create.js b/src/machines/machine-create.js index c6b6fb32..46b7e802 100644 --- a/src/machines/machine-create.js +++ b/src/machines/machine-create.js @@ -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 []; },