Skip to content

Commit 1541e6a

Browse files
committed
fix formatting
1 parent 5927538 commit 1541e6a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/detector.purchases.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ test("check purchase", async () => {
3232
product: undefined,
3333
bid: undefined,
3434
id: expect.stringMatching(/[\d.a-zA-Z-]+/),
35-
items: [
36-
{ product: "product-id-purchase-after", price: "2199", quantity: 1 },
37-
],
35+
items: [{ product: "product-id-purchase-after", price: "2199", quantity: 1 }],
3836
},
3937
]);
4038
});

src/detector.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ function logEvent(info: ProductEvent, node: Node) {
193193

194194
function getId(event: ProductEvent): string {
195195
const items = JSON.stringify(event.items || []);
196-
return [event.page, event.type, event.product ?? event.additionalProduct, event.bid, items].join("-");
196+
return [event.page, event.type, event.product ?? event.additionalProduct, event.bid, items].join(
197+
"-",
198+
);
197199
}
198200

199201
function getPage(): string {

0 commit comments

Comments
 (0)