IO-3570 Check if array and then filter

Signed-off-by: Allan Carr <allan@imexsystems.ca>
This commit is contained in:
Allan Carr
2026-02-19 10:52:37 -08:00
parent 2e53fe8606
commit 38fc3285b4

View File

@@ -369,7 +369,7 @@ async function CalculateDmsVid({ socket, JobData, redisHelpers }) {
jobid: JobData.id,
body: {}
});
return result.filter((v) => v.vehiclesVehId !== null && v.vehiclesVehId !== "");
return Array.isArray(result) ? result.filter((v) => v.vehiclesVehId !== null && v.vehiclesVehId !== "") : [];
} catch (error) {
handleFortellisApiError(socket, error, "CalculateDmsVid", {
vin: JobData.v_vin,