Conform src/hooks/*
code to strictNullChecks
(#10460)
This commit is contained in:
parent
afb2cb93f2
commit
065e970325
2 changed files with 7 additions and 4 deletions
|
@ -166,9 +166,10 @@ export const usePublicRoomDirectory = (): {
|
|||
}, [protocols]);
|
||||
|
||||
useEffect(() => {
|
||||
localStorage.setItem(LAST_SERVER_KEY, config?.roomServer);
|
||||
if (config?.instanceId) {
|
||||
localStorage.setItem(LAST_INSTANCE_KEY, config?.instanceId);
|
||||
if (!config) return;
|
||||
localStorage.setItem(LAST_SERVER_KEY, config.roomServer);
|
||||
if (config.instanceId) {
|
||||
localStorage.setItem(LAST_INSTANCE_KEY, config.instanceId);
|
||||
} else {
|
||||
localStorage.removeItem(LAST_INSTANCE_KEY);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue