瀏覽代碼

added null check to getToken function

Abhinav-grd 4 年之前
父節點
當前提交
9ae7f45339
共有 1 個文件被更改,包括 1 次插入1 次删除
  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 = () => {
-    return getData(LS_KEYS.USER).token;
+    return getData(LS_KEYS.USER)?.token;
 }