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 {