Fix js lint warnings
This commit is contained in:
parent
f4fe60d126
commit
f693b042b5
2 changed files with 4 additions and 5 deletions
|
@ -119,14 +119,13 @@ exports.injectTo = function (extensionId, context) {
|
|||
sendMessage (...args) {
|
||||
// Parse the optional args.
|
||||
let targetExtensionId = extensionId
|
||||
let message, options, responseCallback
|
||||
let message
|
||||
if (args.length === 1) {
|
||||
message = args[0]
|
||||
} else if (args.length === 2) {
|
||||
[targetExtensionId, message] = args
|
||||
} else {
|
||||
console.error('responseCallback is not supported')
|
||||
[targetExtensionId, message, options, responseCallback] = args
|
||||
console.error('options and responseCallback are not supported')
|
||||
}
|
||||
|
||||
ipcRenderer.send('CHROME_RUNTIME_SENDMESSAGE', targetExtensionId, message)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue