bugfix embed errors (#366)

This commit is contained in:
mayeaux 2021-11-24 21:20:36 +01:00 committed by GitHub
parent 5c643cc796
commit 2adbbc2899
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -341,7 +341,12 @@ function App(props: Props) {
cmpScript.async = true;
const getLocaleEndpoint = 'https://api.odysee.com/locale/get';
const gdprRequired = localStorage.getItem('gdprRequired');
let gdprRequired;
try {
gdprRequired = localStorage.getItem('gdprRequired');
} catch (err) {
if (err) return;
}
// gdpr is known to be required, add script
if (gdprRequired === 'true') {
// $FlowFixMe