Skip to content

Commit

Permalink
Release 2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
seeden committed Mar 21, 2019
1 parent 38cbdc6 commit 40b5f88
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 24 deletions.
28 changes: 13 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,19 @@ export default class Example extends Component {

## Parameters

| Name | Type | Required | Default |
|----------------------------|------------------|-----------|------------|
| path | String | true | |
| responsive | Boolean | true | true |
| format | String | true | HORIZONTAL |
| canBeLower | Boolean | true | true |
| enableSingleRequest | Boolean | true | false |
| id | String | false | |
| dimensions | Array | false | |
| className | String | false | |
| targeting | Object | false | |
| onSlotRenderEnded | Function | false | |
| onImpressionViewable | Function | false | |
| onSlotVisibilityChanged | Function | false | |
| collapseEmptyDiv | boolean or Array | false | |
| Name | Type | Required | Default |
|----------------------------|------------------|-----------|-------------------|
| path | String | true | |
| format | String | false | MOBILE_HORIZONTAL |
| canBeLower | Boolean | false | true |
| enableSingleRequest | Boolean | false | false |
| id | String | false | |
| dimensions | Array | false | |
| targeting | Object | false | |
| onSlotRenderEnded | Function | false | |
| onImpressionViewable | Function | false | |
| onSlotVisibilityChanged | Function | false | |
| collapseEmpty | boolean or Array | false | fals |

## Path

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-google-publisher-tag",
"version": "2.0.3",
"version": "2.0.4",
"description": "Adsense via Google publisher tag for the isomorphic applications",
"author": {
"name": "Zlatko Fedor",
Expand Down
11 changes: 3 additions & 8 deletions src/GooglePublisherTag.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,17 +179,12 @@ export default class GooglePublisherTag extends PureComponent<Props, State> {
dimensions,
format,
canBeLower,
responsive,
targeting,
collapseEmpty,
} = props;

let availableDimensions = prepareDimensions(dimensions, format, canBeLower);

// filter by available node space
if (responsive) {
availableDimensions = availableDimensions.filter(dimension => dimension[0] <= width);
}
const availableDimensions = prepareDimensions(dimensions, format, canBeLower)
.filter(dimension => dimension[0] <= width);

// do nothink
if (JSON.stringify(targeting) === JSON.stringify(this.currentTargeting)
Expand Down Expand Up @@ -307,7 +302,7 @@ export default class GooglePublisherTag extends PureComponent<Props, State> {

GooglePublisherTag.defaultProps = {
id: undefined,
format: Format.HORIZONTAL,
format: Format.MOBILE_HORIZONTAL,
canBeLower: true,
enableSingleRequest: false,
dimensions: undefined,
Expand Down

0 comments on commit 40b5f88

Please sign in to comment.