Skip to content

Commit

Permalink
PLY-525: fixed critical issue with responsive size mappings
Browse files Browse the repository at this point in the history
Change-Id: I75411d56dedd793986911b9f4ec8d634be913f17
  • Loading branch information
Patrick Hund committed Jun 25, 2018
1 parent a2daded commit feede51
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.0.4 / 25 Jun 2018

* fixed critical issue with responsive ads size mappings; it did not work properly with prior versions

## 1.0.3 / 13 Jun 2018

* adjusted prop types for slot config to allow passing just one size
Expand Down
2 changes: 1 addition & 1 deletion index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-prebid",
"version": "1.0.3",
"version": "1.0.4",
"description": "Library for ad placements with Prebid header bidding in React applications",
"main": "index.js",
"esnext": "index-esnext.js",
Expand Down
2 changes: 1 addition & 1 deletion src/Advertising.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export default class Advertising {
for (const [key, value] of Object.entries(this.config.sizeMappings)) {
const sizeMapping = window.googletag.sizeMapping();
for (const { viewPortSize, sizes } of value) {
sizeMapping.addSize(viewPortSize, ...sizes);
sizeMapping.addSize(viewPortSize, sizes);
}
this.gptSizeMappings[key] = sizeMapping.build();
}
Expand Down
16 changes: 10 additions & 6 deletions src/__snapshots__/Advertising.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -128,26 +128,30 @@ Array [
0,
0,
],
Array [],
],
Array [
Array [
320,
700,
],
Array [
300,
250,
],
Array [
320,
50,
Array [
300,
250,
],
Array [
320,
50,
],
],
],
Array [
Array [
1050,
200,
],
Array [],
],
]
`;
Expand Down

0 comments on commit feede51

Please sign in to comment.