Skip to content

Commit

Permalink
Merge pull request #4 from prebid/prebid-5.0
Browse files Browse the repository at this point in the history
Prebid 5.0
  • Loading branch information
patmmccann authored Apr 14, 2021
2 parents 07742da + 91edf7f commit 6c0e714
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 892 deletions.
257 changes: 0 additions & 257 deletions modules/zemantaBidAdapter.js

This file was deleted.

107 changes: 0 additions & 107 deletions modules/zemantaBidAdapter.md

This file was deleted.

21 changes: 8 additions & 13 deletions src/sizeMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,17 @@ function evaluateSizeConfig(configs) {
return configs.reduce((results, config) => {
if (
typeof config === 'object' &&
typeof config.mediaQuery === 'string'
typeof config.mediaQuery === 'string' &&
config.mediaQuery.length > 0
) {
let ruleMatch = false;

// TODO: (Prebid - 4.0) Remove empty mediaQuery string check. Disallow empty mediaQuery in sizeConfig.
// Refer: https://github.com/prebid/Prebid.js/pull/4691, https://github.com/prebid/Prebid.js/issues/4810 for more details.
if (config.mediaQuery === '') {
ruleMatch = true;
} else {
try {
ruleMatch = getWindowTop().matchMedia(config.mediaQuery).matches;
} catch (e) {
logWarn('Unfriendly iFrame blocks sizeConfig from being correctly evaluated');

ruleMatch = matchMedia(config.mediaQuery).matches;
}
try {
ruleMatch = getWindowTop().matchMedia(config.mediaQuery).matches;
} catch (e) {
logWarn('Unfriendly iFrame blocks sizeConfig from being correctly evaluated');

ruleMatch = matchMedia(config.mediaQuery).matches;
}

if (ruleMatch) {
Expand Down
Loading

0 comments on commit 6c0e714

Please sign in to comment.