2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 03:19:01 +00:00

chore: fix telemetry calls (rebase master)

This commit is contained in:
18alantom 2022-03-18 16:04:38 +05:30
parent 47e6493699
commit 54b1a60883

View File

@ -53,9 +53,14 @@ export default function registerIpcRendererListeners() {
error.name = 'Updation Error';
handleError(true, error);
});
document.addEventListener('visibilitychange', function () {
if (document.visibilityState !== 'hidden') {
const { visibilityState } = document;
if (visibilityState === 'visible' && !telemetry.started) {
telemetry.start();
}
if (visibilityState !== 'hidden') {
return;
}