Skip to content

Commit 8cb5d40

Browse files
committed
is auth check
1 parent f646d5f commit 8cb5d40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/src/Hooks/useUpdaterSocket.hook.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function useUpdaterSocket(updateData, auth) {
1313
const { request } = useHttp()
1414

1515
/**дебонсированный обработчик входящего обновления */
16-
const debouncedUpdate = useDebouncedFunction(updateData, 200)
16+
const debouncedUpdate = useDebouncedFunction(() => { if (auth.isAuthenticated) updateData() }, 200)
1717

1818
/**колбек для получения url сокета */
1919
const getSocketUrl = useCallback(async () => {

0 commit comments

Comments
 (0)