Skip to content

Commit

Permalink
Fixed cart headers for personalisation request
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaschenko committed Feb 18, 2025
1 parent 7e12423 commit da0c8da
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions blocks/targeted-block/graphql.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ import { getHeaders } from '../../scripts/configs.js';

const addCartHeaders = async () => {
const cartHeaders = await getHeaders('cart');
cartHeaders.keys().forEach((key) => {
setFetchGraphQlHeader(key, cartHeaders[key]);
console.log(cartHeaders);

Check failure on line 6 in blocks/targeted-block/graphql.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
Object.keys(cartHeaders).forEach((key) => {
console.log(key, cartHeaders[key]);

Check failure on line 8 in blocks/targeted-block/graphql.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
if (cartHeaders[key] !== undefined) {
setFetchGraphQlHeader(key, cartHeaders[key]);
}
});
};

Expand Down

0 comments on commit da0c8da

Please sign in to comment.