Skip to content

Commit

Permalink
fix(admin-ui): Fix getting currencyCode in create product variant dia…
Browse files Browse the repository at this point in the history
…log (#2508)
  • Loading branch information
Stefanyshyn authored Nov 10, 2023
1 parent 1348ce0 commit c4595e7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class CreateProductVariantDialogComponent implements Dialog<CreateProduct
constructor(private formBuilder: FormBuilder) {}

ngOnInit() {
this.currencyCode = this.product.variants[0].currencyCode;
this.currencyCode = this.product.variants[0]?.currencyCode;
for (const optionGroup of this.product.optionGroups) {
(this.form.get('options') as FormRecord).addControl(
optionGroup.code,
Expand Down

0 comments on commit c4595e7

Please sign in to comment.