From f12be4b2a9af56f466f96033d1aee1511259bdf0 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 14 Dec 2022 13:40:19 -0800 Subject: [PATCH] fix concat logic --- scripts/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/index.js b/scripts/index.js index 3fc5692..71dcdf9 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -15,9 +15,8 @@ async function init () { for (let i = 0; i < nodes.data.length; i++) { let qemu = await request(`/nodes/${nodes.data[i].node}/qemu`, "GET"); - instances.concat(qemu.data); let lxc = await request(`/nodes/${nodes.data[i].node}/lxc`, "GET"); - instances.concat(lxc.data); + instances = instances.concat(qemu.data, lxc.data); } instances.sort((a, b) => (a.vmid > b.vmid) ? 1 : -1);