fix: fix response data assignment error (#2129)

This commit is contained in:
Yaodong Yu
2023-07-25 13:52:31 +08:00
committed by GitHub
parent 702ee6acd0
commit bfe8e5f3e7
2 changed files with 2 additions and 2 deletions

View File

@ -165,7 +165,7 @@ class ApplicationEditPage extends React.Component {
CertBackend.getCerts(owner) CertBackend.getCerts(owner)
.then((res) => { .then((res) => {
this.setState({ this.setState({
certs: (res.msg === undefined) ? res : [], certs: res.data || [],
}); });
}); });
} }

View File

@ -75,7 +75,7 @@ class MessageEditPage extends React.Component {
ChatBackend.getChats("admin") ChatBackend.getChats("admin")
.then((res) => { .then((res) => {
this.setState({ this.setState({
chats: (res.msg === undefined) ? res : [], chats: res.data || [],
}); });
}); });
} }