diff --git a/src/components/widgets/background/Background.jsx b/src/components/widgets/background/Background.jsx index 45a6fc8c..7f6f2fd3 100644 --- a/src/components/widgets/background/Background.jsx +++ b/src/components/widgets/background/Background.jsx @@ -224,11 +224,13 @@ export default class Background extends React.PureComponent { const photoPack = JSON.parse(localStorage.getItem('photo_packs')); if (photoPack) { const randomPhoto = photoPack[Math.floor(Math.random() * photoPack.length)]; + const photoLocation = randomPhoto.location.replace(/[null]+/g, ''); return this.setState({ url: randomPhoto.url.default, photoInfo: { hidden: false, - credit: randomPhoto.photographer + credit: randomPhoto.photographer, + location: photoLocation !== ' ' && photoLocation !== '???' ? randomPhoto.location : 'N/A', } }); }