Skip to content

Commit

Permalink
replace Array.from function and use from core-js (#7562)
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipStamenkovic authored Oct 12, 2021
1 parent 7123eae commit b2fe194
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/mediakeysBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import find from 'core-js-pure/features/array/find.js';
import arrayFrom from 'core-js-pure/features/array/from';
import { getWindowTop, isFn, logWarn, getDNT, deepAccess, isArray, inIframe, mergeDeep, isStr, isEmpty, deepSetValue, deepClone, parseUrl, cleanObj, logError, triggerPixel, isInteger, isNumber } from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { config } from '../src/config.js';
Expand Down Expand Up @@ -54,7 +55,7 @@ const ORTB_VIDEO_PARAMS = {
skipmin: value => isInteger(value),
skipafter: value => isInteger(value),
sequence: value => isInteger(value),
battr: value => Array.isArray(value) && value.every(v => Array.from({length: 17}, (_, i) => i + 1).indexOf(v) !== -1),
battr: value => Array.isArray(value) && value.every(v => arrayFrom({length: 17}, (_, i) => i + 1).indexOf(v) !== -1),
maxextended: value => isInteger(value),
minbitrate: value => isInteger(value),
maxbitrate: value => isInteger(value),
Expand Down

0 comments on commit b2fe194

Please sign in to comment.