diff --git a/app/utils/sendDeviceInfor.ts b/app/utils/sendDeviceInfor.ts index f8b8859..1fb5758 100644 --- a/app/utils/sendDeviceInfor.ts +++ b/app/utils/sendDeviceInfor.ts @@ -194,9 +194,9 @@ export const sendDeviceInfora = async () => { line.includes("bytes of memory") || line.includes("bytes of physical memory") ) - const mathches = stringMem[0].match(regexSPE) + const mathches = stringMem[0]?.match(regexSPE) - if(mathches && stringMem[0].includes("CHASSIS")){ + if(mathches && stringMem[0]?.includes("CHASSIS")){ console.log(mathches) PID = mathches[0].trim(); SN = showInventoryContent.filter((i)=>i.includes(mathches[0].trim()))[0]?.split("SN:")[1]?.replace(/,/g, "").trim();