Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
Viewtiful committed Oct 5, 2020
1 parent 08bb298 commit f035cd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions modules/teadsBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ function getTimeToFirstByte(win) {
performance.getEntriesByType('navigation')[0] &&
performance.getEntriesByType('navigation')[0].responseStart &&
performance.getEntriesByType('navigation')[0].requestStart &&
performance.getEntriesByType('navigation')[0].responseStart >= 0 &&
performance.getEntriesByType('navigation')[0].requestStart >= 0 &&
performance.getEntriesByType('navigation')[0].responseStart > 0 &&
performance.getEntriesByType('navigation')[0].requestStart > 0 &&
Math.round(
performance.getEntriesByType('navigation')[0].responseStart - performance.getEntriesByType('navigation')[0].requestStart
);
Expand All @@ -146,8 +146,8 @@ function getTimeToFirstByte(win) {
const ttfbWithTimingV1 = performance &&
performance.timing.responseStart &&
performance.timing.requestStart &&
performance.timing.responseStart >= 0 &&
performance.timing.requestStart >= 0 &&
performance.timing.responseStart > 0 &&
performance.timing.requestStart > 0 &&
performance.timing.responseStart - performance.timing.requestStart;

return ttfbWithTimingV1 ? ttfbWithTimingV1.toString() : '';
Expand Down
8 changes: 4 additions & 4 deletions test/spec/modules/teadsBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ describe('teadsBidAdapter', () => {
performance.getEntriesByType('navigation')[0] &&
performance.getEntriesByType('navigation')[0].responseStart &&
performance.getEntriesByType('navigation')[0].requestStart &&
performance.getEntriesByType('navigation')[0].responseStart >= 0 &&
performance.getEntriesByType('navigation')[0].requestStart >= 0 &&
performance.getEntriesByType('navigation')[0].responseStart > 0 &&
performance.getEntriesByType('navigation')[0].requestStart > 0 &&
Math.round(
performance.getEntriesByType('navigation')[0].responseStart - performance.getEntriesByType('navigation')[0].requestStart
);
Expand All @@ -214,8 +214,8 @@ describe('teadsBidAdapter', () => {
const ttfbWithTimingV1 = performance &&
performance.timing.responseStart &&
performance.timing.requestStart &&
performance.timing.responseStart >= 0 &&
performance.timing.requestStart >= 0 &&
performance.timing.responseStart > 0 &&
performance.timing.requestStart > 0 &&
performance.timing.responseStart - performance.timing.requestStart;
const ttfbExpectedV1 = ttfbWithTimingV1 ? ttfbWithTimingV1.toString() : '';

Expand Down

0 comments on commit f035cd2

Please sign in to comment.