Skip to content

Commit

Permalink
uses find util
Browse files Browse the repository at this point in the history
  • Loading branch information
karimJWP authored and karimJWP committed Jul 24, 2020
1 parent 6c96794 commit 34b9f9b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/rtdModule/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ import * as utils from '../../src/utils.js';
import events from '../../src/events.js';
import CONSTANTS from '../../src/constants.json';
import {gdprDataHandler, uspDataHandler} from '../../src/adapterManager.js';
import find from 'core-js-pure/features/array/find.js';

/** @type {string} */
const MODULE_NAME = 'realTimeData';
Expand Down Expand Up @@ -179,7 +180,7 @@ export function init(config) {
export function initSubModules(subModules) {
let subModulesByOrder = [];
_dataProviders.forEach(provider => {
const sm = subModules.find(s => s.name === provider.name);
const sm = find(subModules, s => s.name === provider.name);
const initResponse = sm && sm.init && sm.init(provider, gdprDataHandler.getConsentData(), uspDataHandler.getConsentData()) !== 'failure';
if (initResponse) {
subModulesByOrder.push(Object.assign(sm, {config: provider}));
Expand Down

0 comments on commit 34b9f9b

Please sign in to comment.