do not ping api when document is hidden

This commit is contained in:
Kevin Froman 2020-03-24 00:21:13 -05:00
parent 2aa8cdbaa0
commit 83a1c09af7
1 changed files with 1 additions and 0 deletions

View File

@ -38,6 +38,7 @@ return await fetch('/ping', {
}
let pingCheck = async function(){
if (document.hidden){return}
result = await doPing()
}