From f2f683201dfa6f5c3fd44e72cee3ca42309a87c4 Mon Sep 17 00:00:00 2001 From: David Ralph Date: Sat, 1 May 2021 11:45:12 +0100 Subject: [PATCH] fix: weather auto location not working on firefox --- src/components/modals/main/settings/sections/Weather.jsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/modals/main/settings/sections/Weather.jsx b/src/components/modals/main/settings/sections/Weather.jsx index eedc371c..564d9863 100644 --- a/src/components/modals/main/settings/sections/Weather.jsx +++ b/src/components/modals/main/settings/sections/Weather.jsx @@ -32,12 +32,15 @@ export default class TimeSettings extends React.PureComponent { this.setState({ location: data[0].name }); + + document.querySelector('.reminder-info').style.display = 'block'; + localStorage.setItem('showReminder', true); + }, (error) => { + // firefox requires this 2nd function + console.log(error); }, { enableHighAccuracy: true }); - - document.querySelector('.reminder-info').style.display = 'block'; - localStorage.setItem('showReminder', true); } render() {