Skip to content

Commit

Permalink
update add to cart code to use 'id' instead of 'album_id' for key -- …
Browse files Browse the repository at this point in the history
…since if it is a track page this value will be 'null'
  • Loading branch information
sabjorn committed Dec 6, 2024
1 parent 3e7c538 commit 8d9d098
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default class Player {
const {
price,
currency,
album_id: tralbumId,
id: tralbumId,
title: itemTitle,
is_purchasable,
type
Expand Down
8 changes: 4 additions & 4 deletions test/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("Player", () => {
const mockTralbumDetails = {
price: "5.00",
currency: "USD",
album_id: "987",
id: "987",
title: "Test Album",
is_purchasable: true,
type: "a",
Expand Down Expand Up @@ -194,7 +194,7 @@ describe("Player", () => {
).to.have.been.calledWithExactly(
mockTralbumDetails.price,
mockTralbumDetails.currency,
mockTralbumDetails.album_id,
mockTralbumDetails.id,
mockTralbumDetails.title,
mockTralbumDetails.type
);
Expand Down Expand Up @@ -224,7 +224,7 @@ describe("Player", () => {
const mockTralbumDetails = {
price: "5.00",
currency: "USD",
album_id: "987",
id: "987",
title: "Test Album",
is_purchasable: true,
type: "a",
Expand Down Expand Up @@ -346,7 +346,7 @@ describe("Player", () => {
const mockTralbumDetails = {
price: "0.0",
currency: "GEK",
album_id: "987",
id: "987",
title: "Test Album",
is_purchasable: true,
type: "a",
Expand Down

0 comments on commit 8d9d098

Please sign in to comment.