feat: fix response data assignment error (#2123)

This commit is contained in:
Yaodong Yu
2023-07-24 14:52:30 +08:00
committed by GitHub
parent 3c4112dd44
commit 577bd6ce58
11 changed files with 28 additions and 29 deletions

View File

@ -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,
});
});
}