0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed image card placeholder image changing on select/deselect

This commit is contained in:
Kevin Ansfield 2019-03-22 11:35:59 +00:00
parent 8d52246353
commit e194a7b571

View file

@ -125,15 +125,15 @@ export default Component.extend({
this.set('payload', {}); this.set('payload', {});
} }
let placeholders = ['summer', 'mountains', 'ufo-attack'];
this.set('placeholder', placeholders[Math.floor(Math.random() * placeholders.length)]);
this.registerComponent(this); this.registerComponent(this);
}, },
didReceiveAttrs() { didReceiveAttrs() {
this._super(...arguments); this._super(...arguments);
let placeholders = ['summer', 'mountains', 'ufo-attack'];
this.set('placeholder', placeholders[Math.floor(Math.random() * placeholders.length)]);
// `payload.files` can be set if we have an externaly set image that // `payload.files` can be set if we have an externaly set image that
// should be uploaded. Typical example would be from a paste or drag/drop // should be uploaded. Typical example would be from a paste or drag/drop
if (!isEmpty(this.payload.files)) { if (!isEmpty(this.payload.files)) {