phantomjs: performance.getEntriesByType not supported (#21009)

This commit is contained in:
Marcus Efraimsson 2019-12-16 09:40:12 +01:00 committed by Torkel Ödegaard
parent 16f0e75448
commit 71382ae7ed

View File

@ -175,7 +175,7 @@ export class GrafanaApp {
ttiPolyfill.getFirstConsistentlyInteractive().then((tti: any) => {
// Collecting paint metrics first
const paintMetrics = performance.getEntriesByType('paint');
const paintMetrics = performance && performance.getEntriesByType ? performance.getEntriesByType('paint') : [];
for (const metric of paintMetrics) {
reportPerformance(metric.name, Math.round(metric.startTime + metric.duration));