fixing bug that would show the previous harvest plan when you click on a field that does not have one set without closing the drawer first
This commit is contained in:
parent
e9281b2812
commit
43f817c875
1 changed files with 2 additions and 1 deletions
|
|
@ -134,7 +134,8 @@ export default function FieldDrawer(props: Props) {
|
|||
hPlanAPI
|
||||
.listHarvestPlans(1, 0, "desc", "createDate", field.key(), as)
|
||||
.then(resp => {
|
||||
if (resp.data.harvestPlan.length > 0) {
|
||||
console.log(resp)
|
||||
if (resp.data.harvestPlan) {
|
||||
let plan = resp.data.harvestPlan[0];
|
||||
setHPlan(HarvestPlan.any(plan));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue