Skip to content

Commit

Permalink
Merge pull request #328 from kiva/ACK-866_loan_card_fix
Browse files Browse the repository at this point in the history
fix: p4 tag on loan card
  • Loading branch information
mcstover authored Dec 8, 2023
2 parents 77a10f1 + 8513e93 commit 94f1a15
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions @kiva/kv-components/utils/loanCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ export function loanCardComputedProperties(props) {
// Tag as first option for LSE loans
if (isLseLoan && tags.length) {
const position = Math.floor(Math.random() * tags.length);
const atag = tags[position];
callouts.push(atag);
const p1Tag = tags[position];
callouts.push(p1Tag);
}

if (!categoryPageName.value) {
Expand Down Expand Up @@ -116,9 +116,9 @@ export function loanCardComputedProperties(props) {
// P4 Tag
if (!!tags.length && callouts.length < 2) {
const position = Math.floor(Math.random() * tags.length);
const atag = tags[position];
if (!callouts.filter((c) => c.toUpperCase() === tag.toUpperCase()).length) {
callouts.push(atag);
const p4Tag = tags[position];
if (!callouts.filter((c) => c.toUpperCase() === p4Tag.toUpperCase()).length) {
callouts.push(p4Tag);
}
}

Expand Down

0 comments on commit 94f1a15

Please sign in to comment.