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;