Pārlūkot izejas kodu

added null check to getToken function

Abhinav-grd 4 gadi atpakaļ
vecāks
revīzija
9ae7f45339
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      src/utils/common/key.ts

+ 1 - 1
src/utils/common/key.ts

@@ -16,5 +16,5 @@ export const getActualKey = async () => {
 }
 }
 
 
 export const getToken = () => {
 export const getToken = () => {
-    return getData(LS_KEYS.USER).token;
+    return getData(LS_KEYS.USER)?.token;
 }
 }