We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95496f0 commit ce8db6cCopy full SHA for ce8db6c
1 file changed
ghost/admin/app/services/unsplash.js
@@ -118,8 +118,8 @@ export default Service.extend({
118
}).restartable(),
119
120
_addPhotosFromResponse(response, searchTermAtRequest) {
121
- // If this is a search result, only apply it if the search term still matches
122
- // This prevents race conditions where old search results overwrite new ones
+ // If a search term was provided at the time of the request,
+ // we only want to add photos if the search term matches the current one.
123
if (searchTermAtRequest && searchTermAtRequest !== this.searchTerm) {
124
return;
125
}
0 commit comments