Skip to content

Commit 7b25654

Browse files
committed
fix: add null check for performance.memory.usedJSHeapSize before sending analytics data in document, presentation, and spreadsheet editors
1 parent 89b2f2d commit 7b25654

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

  • public/web-apps/apps

public/web-apps/apps/documenteditor/main/app.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17289,8 +17289,10 @@ function _extend_object(t, e) {
1728917289
t = (t / 1e3).toFixed(1) + 's';
1729017290
(this.send('1431.7617.gif', [o, e, t]),
1729117291
setTimeout(() => {
17292-
var t = 10 * Math.round(performance.memory.usedJSHeapSize / 1024 / 1024 / 10) + 'mb';
17293-
this.send('1431.9100.gif', [o, t]);
17292+
if (performance.memory && performance.memory.usedJSHeapSize) {
17293+
var t = 10 * Math.round(performance.memory.usedJSHeapSize / 1024 / 1024 / 10) + 'mb';
17294+
this.send('1431.9100.gif', [o, t]);
17295+
}
1729417296
}, 3e3));
1729517297
},
1729617298
}

public/web-apps/apps/presentationeditor/main/app.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14186,8 +14186,10 @@ function _extend_object(t, e) {
1418614186
t = (t / 1e3).toFixed(1) + 's';
1418714187
(this.send('1431.7617.gif', [o, e, t]),
1418814188
setTimeout(() => {
14189-
var t = 10 * Math.round(performance.memory.usedJSHeapSize / 1024 / 1024 / 10) + 'mb';
14190-
this.send('1431.9100.gif', [o, t]);
14189+
if (performance.memory && performance.memory.usedJSHeapSize) {
14190+
var t = 10 * Math.round(performance.memory.usedJSHeapSize / 1024 / 1024 / 10) + 'mb';
14191+
this.send('1431.9100.gif', [o, t]);
14192+
}
1419114193
}, 3e3));
1419214194
},
1419314195
}

public/web-apps/apps/spreadsheeteditor/main/app.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17336,8 +17336,10 @@ function _extend_object(t, e) {
1733617336
t = (t / 1e3).toFixed(1) + 's';
1733717337
(this.send('1431.7617.gif', [o, e, t]),
1733817338
setTimeout(() => {
17339-
var t = 10 * Math.round(performance.memory.usedJSHeapSize / 1024 / 1024 / 10) + 'mb';
17340-
this.send('1431.9100.gif', [o, t]);
17339+
if (performance.memory && performance.memory.usedJSHeapSize) {
17340+
var t = 10 * Math.round(performance.memory.usedJSHeapSize / 1024 / 1024 / 10) + 'mb';
17341+
this.send('1431.9100.gif', [o, t]);
17342+
}
1734117343
}, 3e3));
1734217344
},
1734317345
}

0 commit comments

Comments
 (0)