fix: honor extensionId arg in chrome.runtime.connect (#16998)
The first argument to chrome.runtime.connect is extensionId, not connectInfo.
This commit is contained in:
parent
d4f5ebefe6
commit
d507ba68a7
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ export function injectTo (extensionId: string, context: any) {
|
|||
let targetExtensionId = extensionId
|
||||
let connectInfo = { name: '' }
|
||||
if (args.length === 1) {
|
||||
connectInfo = args[0]
|
||||
targetExtensionId = args[0]
|
||||
} else if (args.length === 2) {
|
||||
[targetExtensionId, connectInfo] = args
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue