fix(eomservice): changes to stop a crash incase the sql returned nothing due to start up

This commit is contained in:
2025-09-06 09:02:09 -05:00
parent 415d2e4a1d
commit 6caa5984e7

View File

@@ -37,9 +37,9 @@ setTimeout(async () => {
const shiftTimeSplit = shift?.data[0]?.shiftChange.split(":");
const cronSetup = `${
shiftTimeSplit.length > 0 ? `${parseInt(shiftTimeSplit[1])}` : "0"
shiftTimeSplit?.length > 0 ? `${parseInt(shiftTimeSplit[1])}` : "0"
} ${
shiftTimeSplit.length > 0 ? `${parseInt(shiftTimeSplit[0])}` : "7"
shiftTimeSplit?.length > 0 ? `${parseInt(shiftTimeSplit[0])}` : "7"
} * * *`;
//console.log(cronSetup);