update catch memory

This commit is contained in:
joseph le 2023-10-26 07:38:25 +07:00
parent 66690e3d5d
commit 6932aad751
1 changed files with 2 additions and 2 deletions

View File

@ -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();