mirror of
https://github.com/mue/mue.git
synced 2026-06-11 02:59:06 +02:00
fix: empty categories instead of "null" string.
With no categories selected, the value became "null", which is invalid and causes Unsplash to return any image from their library. With an empty string, the API enables all categories so Unsplash uses our collections.
This commit is contained in:
@@ -103,12 +103,12 @@ export default class Background extends PureComponent {
|
||||
if (collection) {
|
||||
requestURL = `${variables.constants.API_URL}/images/unsplash?collections=${collection}&quality=${apiQuality}`;
|
||||
} else {
|
||||
requestURL = `${variables.constants.API_URL}/images/unsplash?categories=${apiCategories}&quality=${apiQuality}`;
|
||||
requestURL = `${variables.constants.API_URL}/images/unsplash?categories=${apiCategories || ''}&quality=${apiQuality}`;
|
||||
}
|
||||
break;
|
||||
// Defaults to Mue
|
||||
default:
|
||||
requestURL = `${variables.constants.API_URL}/images/random?categories=${apiCategories}&quality=${apiQuality}&excludes=${backgroundExclude}`;
|
||||
requestURL = `${variables.constants.API_URL}/images/random?categories=${apiCategories || ''}&quality=${apiQuality}&excludes=${backgroundExclude}`;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user