Home
/
risinglegends.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
chore(release): 0.2.5
[risinglegends.git]
/
src
/
client
/
http.ts
diff --git
a/src/client/http.ts
b/src/client/http.ts
index 3298b5710bed3f029a0081405680b3bdbe8753da..312cea1f73a0891ebbc58de3238a5e435c6f17a5 100644
(file)
--- a/
src/client/http.ts
+++ b/
src/client/http.ts
@@
-1,4
+1,4
@@
-export function authToken() {
+export function authToken()
: string
{
return localStorage.getItem('authToken');
}
@@
-21,6
+21,12
@@
export const http = {
}
});
- return res.json();
+ try {
+ return res.json();
+ }
+ catch {
+ console.log('No valid JSON response');
+ return null;
+ }
}
}