refactor: cleanup photoinformation slightly

This commit is contained in:
David Ralph
2021-08-19 22:24:03 +01:00
parent 7ce2afb773
commit 2f3252d15e
2 changed files with 16 additions and 9 deletions

View File

@@ -29,12 +29,12 @@ export default class Favourite extends PureComponent {
if (!url) {
return;
}
localStorage.setItem('favourite', JSON.stringify({
url: url,
credit: document.getElementById('credit').textContent,
location: document.getElementById('infoLocation').textContent,
camera: document.getElementById('infoCamera').textContent,
location: document.getElementById('infoLocation') ? document.getElementById('infoLocation').innerText : 'N/A',
camera: document.getElementById('infoCamera') ? document.getElementById('infoCamera').innerText : 'N/A',
resolution: document.getElementById('infoResolution').textContent
}));