🐛 Fixed Unsplash image selector being empty when first opening (#1100)
closes https://github.com/TryGhost/Ghost/issues/10455 - call `loadNew()` when initialising the `unsplash` service. Services are lazy-initialised so this is only called when the service is first injected which happens when the `<GhUnsplash>` component is first rendered
This commit is contained in:
parent
5cd442ee96
commit
1cf7e576d9
|
@ -29,6 +29,7 @@ export default Service.extend({
|
|||
init() {
|
||||
this._super(...arguments);
|
||||
this._reset();
|
||||
this.loadNew();
|
||||
},
|
||||
|
||||
loadNew() {
|
||||
|
|
|
@ -40,6 +40,7 @@ export default function () {
|
|||
this.passthrough('https://count.ghost.org/');
|
||||
this.passthrough('http://www.gravatar.com/**');
|
||||
this.passthrough('https://cdn.jsdelivr.net/**');
|
||||
this.passthrough('https://api.unsplash.com/**');
|
||||
}
|
||||
|
||||
// Mock all endpoints here as there is no real API during testing
|
||||
|
|
Loading…
Reference in New Issue