Skip to content

Commit 8236e53

Browse files
committed
fix: add safeguard for querying app settings
1 parent a932d07 commit 8236e53

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

package/src/components/Chat/hooks/useAppSettings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export const useAppSettings = <
2222
* Fetches app settings from the backend when offline support is disabled.
2323
*/
2424
const enforceAppSettingsWithoutOfflineSupport = async () => {
25+
if (!client.userID) return;
26+
2527
try {
2628
const appSettings = await client.getAppSettings();
2729
if (isMounted.current) {

0 commit comments

Comments
 (0)