diff --git a/Client/src/App.jsx b/Client/src/App.jsx index df3e79c80..56c279e78 100644 --- a/Client/src/App.jsx +++ b/Client/src/App.jsx @@ -53,7 +53,9 @@ function App() { const dispatch = useDispatch(); useEffect(() => { - dispatch(getAppSettings({ authToken })); + if (authToken) { + dispatch(getAppSettings({ authToken })); + } }, [dispatch, authToken]); // Cleanup diff --git a/Client/src/Pages/AdvancedSettings/index.jsx b/Client/src/Pages/AdvancedSettings/index.jsx index 38c0a3b12..7609b2578 100644 --- a/Client/src/Pages/AdvancedSettings/index.jsx +++ b/Client/src/Pages/AdvancedSettings/index.jsx @@ -119,7 +119,7 @@ const AdvancedSettings = ({ isAdmin }) => { diff --git a/Server/models/AppSettings.js b/Server/models/AppSettings.js index 79ede650a..f95d58f4b 100644 --- a/Server/models/AppSettings.js +++ b/Server/models/AppSettings.js @@ -48,6 +48,7 @@ const AppSettingsSchema = mongoose.Schema( }, pagespeedApiKey: { type: String, + default: "", }, systemEmailHost: { type: String,