core/server: fix oneway method failure causing empty plugin list

This commit is contained in:
Koushik Dutta
2021-11-01 13:31:23 -07:00
parent 5927342220
commit 034b3dfe99
4 changed files with 5 additions and 5 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/core",
"version": "0.0.134",
"version": "0.0.135",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/core",
"version": "0.0.134",
"version": "0.0.135",
"license": "Apache-2.0",
"dependencies": {
"@scrypted/sdk": "file:../../sdk",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/core",
"version": "0.0.134",
"version": "0.0.135",
"description": "Scrypted Core plugin. Provides the UI, websocket, and engine.io APIs.",
"author": "Scrypted",
"license": "Apache-2.0",

View File

@@ -125,7 +125,7 @@ class RpcProxy implements ProxyHandler<any> {
method,
};
if (this.proxyOneWayMethods?.includes(method)) {
if (this.proxyOneWayMethods?.includes?.(method)) {
rpcApply.oneway = true;
this.peer.send(rpcApply, e => new RPCResultError(e.message, e));
return Promise.resolve();

View File

@@ -35,7 +35,7 @@ interface DeviceProxyPair {
proxy: ScryptedDevice;
}
const MIN_SCRYPTED_CORE_VERSION = '0.0.121';
const MIN_SCRYPTED_CORE_VERSION = '0.0.135';
const PLUGIN_DEVICE_STATE_VERSION = 2;
export class ScryptedRuntime {