From efe51314159af533960296c7502e11c01af131ab Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Fri, 26 Aug 2022 16:07:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=AE=8C=E6=95=B4=E9=95=9C?= =?UTF-8?q?=E5=83=8F=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/VideoAccess-VCMP/api/app/lib/controllers/mirror/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/VideoAccess-VCMP/api/app/lib/controllers/mirror/index.js b/code/VideoAccess-VCMP/api/app/lib/controllers/mirror/index.js index c90f5e3..d722713 100644 --- a/code/VideoAccess-VCMP/api/app/lib/controllers/mirror/index.js +++ b/code/VideoAccess-VCMP/api/app/lib/controllers/mirror/index.js @@ -271,7 +271,7 @@ async function get (ctx) { const curKey = nextKeyPre + index let child = JSON.parse(JSON.stringify(mirrorTrees.filter(mt => mt.dependence == tn.id))) let cameras = mirrorCameras.filter(mc => mc.treeIds.includes(tn.id)) - if (cameras) { + if (cameras.length) { // 有摄像头 向下再创建一级节点 tn.children = cameras.map((c, cIndex) => { return {