fix: Cannot read properties of undefined (reading 'map') (close #148)
This commit is contained in:
@@ -156,6 +156,9 @@ const SiderBar = () => {
|
||||
|
||||
const loadStatus = async () => {
|
||||
const res = await API.get('/api/status');
|
||||
if (res === undefined) {
|
||||
return;
|
||||
}
|
||||
const { success, data } = res.data;
|
||||
if (success) {
|
||||
localStorage.setItem('status', JSON.stringify(data));
|
||||
|
||||
Reference in New Issue
Block a user