|
@@ -119,7 +119,13 @@ exports.injectTo = function (extensionId, isBackgroundPage, context) {
|
|
|
if (args.length === 1) {
|
|
|
message = args[0]
|
|
|
} else if (args.length === 2) {
|
|
|
- [targetExtensionId, message] = args
|
|
|
+ // A case of not provide extension-id: (message, responseCallback)
|
|
|
+ if (typeof args[1] === 'function') {
|
|
|
+ console.error('responseCallback is not supported')
|
|
|
+ message = args[0]
|
|
|
+ } else {
|
|
|
+ [targetExtensionId, message] = args
|
|
|
+ }
|
|
|
} else {
|
|
|
console.error('options and responseCallback are not supported')
|
|
|
}
|