Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when calling adjustOrderLine with quantity 0 #435

Closed
michaelbromley opened this issue Aug 12, 2020 · 0 comments
Closed

Error when calling adjustOrderLine with quantity 0 #435

michaelbromley opened this issue Aug 12, 2020 · 0 comments
Assignees
Labels
type: bug 🐛 Something isn't working
Milestone

Comments

@michaelbromley
Copy link
Member

Describe the bug
When executing the mutation adjustOrderLine and passing a quantity of 0, the server errors with "Cannot read property 'pendingAdjustments' of undefined"

To Reproduce
Steps to reproduce the behavior:

  1. Add an item to the order in the Shop API
  2. Execute adjustOrderLine(orderLineId: <ID>, quantity: 0) { ...}
  3. See error:
{
"errors": [
  {
    "message": "Cannot read property 'pendingAdjustments' of undefined",
    "locations": [
      {
        "line": 2,
        "column": 3
      }
    ],
    "path": [
      "adjustOrderLine"
    ]
  }
],
"data": {
  "adjustOrderLine": null
}
}

Expected behavior
In this case it should behave the same as removeOrderLine.

Environment (please complete the following information):

  • @vendure/core version: 0.14.0
  • Nodejs version: 12.x
  • Database (mysql/postgres etc): mysql
@michaelbromley michaelbromley added the type: bug 🐛 Something isn't working label Aug 12, 2020
@michaelbromley michaelbromley self-assigned this Aug 12, 2020
@michaelbromley michaelbromley added this to the v0.15.0 milestone Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant