fix(medusa): Delete ProductOption on Product without Variants (#1846)

**What**
Solves admin issue [166](https://github.com/medusajs/admin/issues/166)

Deleting a product option on a product without variants currently throws, because we are cleaning up variant options as well.  

**How**
Only do variant clean up, if product has variants
This commit is contained in:
Oliver Windall Juhl
2022-08-29 20:51:45 +02:00
committed by GitHub
parent 37056b8066
commit d14a0398fb
3 changed files with 86 additions and 23 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
Fixes an error thrown when deleting product options on a product without variants