mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-08 08:39:59 +00:00
Message response doesn't need to be in message format
This commit is contained in:
@@ -100,10 +100,7 @@ async function handleMessage (message) {
|
||||
case "bridge:/getInfo": {
|
||||
const extensionVersion = message.data;
|
||||
|
||||
return {
|
||||
subject: "main:/bridgeInfo"
|
||||
, data: __applicationVersion
|
||||
};
|
||||
return __applicationVersion;
|
||||
};
|
||||
|
||||
case "bridge:/startDiscovery":
|
||||
|
||||
@@ -3,12 +3,10 @@ import semver from "semver";
|
||||
export default async function getBridgeInfo () {
|
||||
let applicationVersion;
|
||||
try {
|
||||
const response = await browser.runtime.sendNativeMessage(
|
||||
applicationVersion = await browser.runtime.sendNativeMessage(
|
||||
APPLICATION_NAME
|
||||
, { subject: "bridge:/getInfo"
|
||||
, data: EXTENSION_VERSION });
|
||||
|
||||
applicationVersion = response.data;
|
||||
} catch (err) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user