1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-05 11:37:01 +02:00

Minor code review

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1992
This commit is contained in:
Raymond Hill 2022-02-18 06:52:34 -05:00
parent bba4732c6b
commit 60072e7996
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -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;