mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-18 05:43:49 +08:00
feat: fix response data assignment error (#2123)
This commit is contained in:
@ -46,14 +46,14 @@ class ProductEditPage extends React.Component {
|
||||
|
||||
getProduct() {
|
||||
ProductBackend.getProduct(this.state.organizationName, this.state.productName)
|
||||
.then((product) => {
|
||||
if (product === null) {
|
||||
.then((res) => {
|
||||
if (res.data === null) {
|
||||
this.props.history.push("/404");
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
product: product,
|
||||
product: res.data,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user