Merge pull request #4137 from overleaf/jpa-fix-metrics-collection

[PdfJsMetrics] fix metrics collection with disabled service worker

GitOrigin-RevId: 607ecd15a3b95b33a45506c489557e5116168c3d
This commit is contained in:
Jakob Ackermann 2021-06-02 13:45:48 +02:00 committed by Copybot
parent 58c7b6188f
commit 862f7f413a

View file

@ -78,6 +78,7 @@ function submitCompileMetrics(metrics) {
function submitPDFBandwidth(metrics) {
const metricsFlat = {}
Object.entries(metrics).forEach(([section, items]) => {
if (!items) return
Object.entries(items).forEach(([key, value]) => {
metricsFlat[section + '_' + key] = value
})