From 60072e7996e58cd7cca5186fde742d83cc6a612c Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 18 Feb 2022 06:52:34 -0500 Subject: [PATCH] Minor code review Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1992 --- platform/common/vapi-background.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/common/vapi-background.js b/platform/common/vapi-background.js index 20d135942..3991b1d66 100644 --- a/platform/common/vapi-background.js +++ b/platform/common/vapi-background.js @@ -864,9 +864,9 @@ vAPI.messaging = { const { origin, tab, url } = sender; portDetails.frameId = sender.frameId; portDetails.frameURL = url; - portDetails.privileged = - origin !== undefined && origin === this.PRIVILEGED_ORIGIN || - origin === undefined && url.startsWith(this.PRIVILEGED_ORIGIN); + portDetails.privileged = origin !== undefined + ? origin === this.PRIVILEGED_ORIGIN + : url.startsWith(this.PRIVILEGED_ORIGIN); if ( tab ) { portDetails.tabId = tab.id; portDetails.tabURL = tab.url;