Skip to content

Commit

Permalink
Addresses comment left over from PR#3841 (#3853)
Browse files Browse the repository at this point in the history
  • Loading branch information
lannka authored Jun 30, 2016
1 parent cf60b96 commit 0f6dc4b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions extensions/amp-analytics/0.1/amp-analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,8 @@ export class AmpAnalytics extends AMP.BaseElement {
const keyPromise = urlReplacementsFor(this.getWin()).expand(key);
const cryptoPromise = cryptoFor(this.getWin());
return Promise.all([keyPromise, cryptoPromise])
.then(results => {
const key = results[0];
const crypto = results[1];
return crypto.sha384(key);
}).then(digest => {
return Promise.resolve(digest[0] % 100 < spec['threshold']);
});
.then(results => results[1].sha384(results[0]))
.then(digest => digest[0] % 100 < spec['threshold']);
}

/**
Expand Down

0 comments on commit 0f6dc4b

Please sign in to comment.