Skip to content

Commit

Permalink
remove Array.prototype.find use (ampproject#4884)
Browse files Browse the repository at this point in the history
  • Loading branch information
erwinmombay authored and mityaha committed Nov 30, 2016
1 parent 70ca31c commit 1bdc8dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ads/google/a4a/traffic-experiments.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ function maybeSetExperimentFromUrl(win, experimentName,
if (!expParam) {
return;
}
const a4aParam = expParam.split(',').find(
x => { return x.indexOf('a4a:') == 0; });
const match = /(^|,)(a4a:[^,]*)/.exec(expParam);
const a4aParam = match && match[2];
if (!a4aParam) {
return;
}
Expand Down

0 comments on commit 1bdc8dc

Please sign in to comment.