From 1d6013f73846a59e0b8cf01e1893e032bd5aab82 Mon Sep 17 00:00:00 2001 From: David Ralph Date: Mon, 24 May 2021 22:00:43 +0100 Subject: [PATCH] fix: background location info works properly on unsplash and pexels now --- src/components/widgets/background/Background.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/widgets/background/Background.jsx b/src/components/widgets/background/Background.jsx index 34d354d4..431cd6cd 100644 --- a/src/components/widgets/background/Background.jsx +++ b/src/components/widgets/background/Background.jsx @@ -178,8 +178,6 @@ export default class Background extends React.PureComponent { photographerURL = data.photographer_page; } - const location = data.location.replace(/[null]+/g, ''); - this.setState({ url: data.file, type: 'api', @@ -187,7 +185,7 @@ export default class Background extends React.PureComponent { photoInfo: { hidden: false, credit: credit, - location: (location !== ' ' && location !== ', ') ? data.location : 'N/A', + location: data.location, camera: data.camera, resolution: data.resolution, url: data.file,