From 86477dd4e536a1df3de7a71a6b94a32b3f7d3e16 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 12 Apr 2023 18:08:11 -0400 Subject: [PATCH] Move faster test first --- platform/common/vapi-background.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/common/vapi-background.js b/platform/common/vapi-background.js index ca905fe5f..5b5819133 100644 --- a/platform/common/vapi-background.js +++ b/platform/common/vapi-background.js @@ -1370,11 +1370,11 @@ vAPI.Net = class { this.lastUnprocessedRequestTime = Date.now(); } hasUnprocessedRequest(tabId) { + if ( this.unprocessedTabs.size === 0 ) { return false; } if ( (Date.now() - this.lastUnprocessedRequestTime) > 60000 ) { this.removeUnprocessedRequest(); } - return this.unprocessedTabs.size !== 0 && - this.unprocessedTabs.has(tabId); + return this.unprocessedTabs.has(tabId); } removeUnprocessedRequest(tabId) { if ( this.deferredSuspendableListener === undefined ) {