From 62ddbba4b212e8812406792604ae894d5229ac99 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Mon, 19 Sep 2022 15:48:26 -0700 Subject: [PATCH] reolink: prevent motion check crash so data can be dumped --- plugins/reolink/package-lock.json | 4 ++-- plugins/reolink/package.json | 2 +- plugins/reolink/src/reolink.api.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/reolink/package-lock.json b/plugins/reolink/package-lock.json index 1d9768ad1..37e7d52a8 100644 --- a/plugins/reolink/package-lock.json +++ b/plugins/reolink/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/reolink", - "version": "0.0.8", + "version": "0.0.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/reolink", - "version": "0.0.8", + "version": "0.0.9", "license": "Apache", "dependencies": { "@koush/axios-digest-auth": "^0.8.5", diff --git a/plugins/reolink/package.json b/plugins/reolink/package.json index 5e3ee6cbb..5d6d51646 100644 --- a/plugins/reolink/package.json +++ b/plugins/reolink/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/reolink", - "version": "0.0.8", + "version": "0.0.9", "description": "Reolink Plugin for Scrypted", "author": "Scrypted", "license": "Apache", diff --git a/plugins/reolink/src/reolink.api.ts b/plugins/reolink/src/reolink.api.ts index 6c153f550..5330f894e 100644 --- a/plugins/reolink/src/reolink.api.ts +++ b/plugins/reolink/src/reolink.api.ts @@ -32,7 +32,7 @@ export class ReolinkCameraClient { url: url.toString(), }); return { - value: !!response.data[0].value.state, + value: !!response.data?.[0]?.value?.state, data: response.data, }; }