mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-18 05:43:49 +08:00
feat: show 404 error for non-existent objects in edit pages
This commit is contained in:
@ -45,6 +45,11 @@ class ProductEditPage extends React.Component {
|
||||
getProduct() {
|
||||
ProductBackend.getProduct(this.props.account.owner, this.state.productName)
|
||||
.then((product) => {
|
||||
if (product === null) {
|
||||
this.props.history.push("/404");
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
product: product,
|
||||
});
|
||||
|
Reference in New Issue
Block a user