mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-21 08:13:49 +08:00
feat: show 404 error for non-existent objects in edit pages
This commit is contained in:
@ -41,6 +41,11 @@ class ChatEditPage extends React.Component {
|
||||
getChat() {
|
||||
ChatBackend.getChat("admin", this.state.chatName)
|
||||
.then((chat) => {
|
||||
if (chat === null) {
|
||||
this.props.history.push("/404");
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
chat: chat,
|
||||
});
|
||||
|
Reference in New Issue
Block a user