fix: background proxy and offline mode hot reload bugs

This commit is contained in:
David Ralph
2021-08-01 15:02:18 +01:00
parent 9db7b210bc
commit 141da4ba36
3 changed files with 14 additions and 10 deletions

View File

@@ -56,7 +56,7 @@ export default function PhotoInformation(props) {
setWidth(event.target.width);
setHeight(event.target.height);
}
img.src = props.url;
img.src = (localStorage.getItem('ddgProxy') === 'true' && !props.info.offline && !props.url.startsWith('data:')) ? window.constants.DDG_IMAGE_PROXY + props.url : props.url;
return (
<div className='photoInformation'>