Update checking pending requests ids

This commit is contained in:
Ivan Grachev 2022-07-06 18:23:15 +03:00
parent 07b00a014f
commit 51d8df8c0e

View File

@ -1,8 +1,8 @@
// Copyright © 2022 Tokenary. All rights reserved.
function didChangeVisibility() {
if (document.visibilityState === 'visible' && pendingRequestsIds.size != 0) {
pendingRequestsIds.forEach(id => {
if (document.visibilityState === 'visible' && document.pendingRequestsIds.size != 0) {
document.pendingRequestsIds.forEach(id => {
const request = {id: id, subject: "getResponse"};
browser.runtime.sendMessage(request).then((response) => {
sendToInpage(response, id);