Navigation Menu

Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ericandrewlewis committed Jul 19, 2019
1 parent 5841683 commit d5c9e06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 6 additions & 4 deletions src/service/performance-impl.js
Expand Up @@ -339,10 +339,12 @@ export class Performance {
// Layout shift entries are not available from the Performance Timeline
// through `getEntriesByType`, so a separate PerformanceObserver is
// required for this metric.
const layoutInstabilityObserver = new this.win.PerformanceObserver(list => {
list.getEntries().forEach(processEntry);
this.flush();
});
const layoutInstabilityObserver = new this.win.PerformanceObserver(
list => {
list.getEntries().forEach(processEntry);
this.flush();
}
);
layoutInstabilityObserver.observe({type: 'layout-shift', buffered: true});
}

Expand Down
4 changes: 1 addition & 3 deletions test/unit/test-performance.js
Expand Up @@ -1363,9 +1363,7 @@ describes.realWin('PeformanceObserver metrics', {amp: true}, env => {
toggleVisibility(fakeWin, true);
performanceObserver.triggerCallback({
getEntries() {
return [
{entryType: 'layout-shift', value: 2, hadRecentInput: false},
];
return [{entryType: 'layout-shift', value: 2, hadRecentInput: false}];
},
});

Expand Down

0 comments on commit d5c9e06

Please sign in to comment.