2
0
mirror of https://github.com/frappe/books.git synced 2025-01-11 02:36:14 +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

@ -55,7 +55,12 @@ export default function registerIpcRendererListeners() {
});
document.addEventListener('visibilitychange', function () {
if (document.visibilityState !== 'hidden') {
const { visibilityState } = document;
if (visibilityState === 'visible' && !telemetry.started) {
telemetry.start();
}
if (visibilityState !== 'hidden') {
return;
}