mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user