Skip to content

Commit

Permalink
Fixing lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-bizz committed Sep 8, 2023
1 parent 630b031 commit 4d72dc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ModalInstanceCtrl {
this.facebookPixelId = facebookPixelId

this.suggestedAmounts = transform(suggestedAmounts, (result, value, key) => {
if (key === 'jcr:primaryType' || !value?.amount) return;
if (key === 'jcr:primaryType' || !value?.amount) return
result.push({
amount: Number(value.amount),
description: value.description,
Expand All @@ -23,7 +23,7 @@ class ModalInstanceCtrl {
}

transformSuggestedAmounts () {
const filterOutZeroAmounts = this.suggestedAmounts.filter((amount) => amount?.amount);
const filterOutZeroAmounts = this.suggestedAmounts.filter((amount) => amount?.amount)
return transform(filterOutZeroAmounts, (result, value, i) => {
delete value.order
result[i + 1] = value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class ProductConfigFormController {

const suggestedAmountsObservable = this.designationsService.suggestedAmounts(this.code, this.itemConfig)
.do(suggestedAmounts => {
this.suggestedAmounts = suggestedAmounts.filter((amount) => amount?.amount);
this.suggestedAmounts = suggestedAmounts.filter((amount) => amount?.amount)
this.useSuggestedAmounts = !isEmpty(this.suggestedAmounts)
})

Expand Down Expand Up @@ -173,7 +173,7 @@ class ProductConfigFormController {
const amountOptions = isEmpty(this.suggestedAmounts)
? this.selectableAmounts
: map(this.suggestedAmounts, 'amount')

if (this.itemConfig.amount) {
if (amountOptions.indexOf(this.itemConfig.amount) === -1) {
this.changeCustomAmount(this.itemConfig.amount)
Expand Down

0 comments on commit 4d72dc5

Please sign in to comment.