IO-3570 Check if array and then filter
Signed-off-by: Allan Carr <allan@imexsystems.ca>
This commit is contained in:
@@ -369,7 +369,7 @@ async function CalculateDmsVid({ socket, JobData, redisHelpers }) {
|
|||||||
jobid: JobData.id,
|
jobid: JobData.id,
|
||||||
body: {}
|
body: {}
|
||||||
});
|
});
|
||||||
return result.filter((v) => v.vehiclesVehId !== null && v.vehiclesVehId !== "");
|
return Array.isArray(result) ? result.filter((v) => v.vehiclesVehId !== null && v.vehiclesVehId !== "") : [];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
handleFortellisApiError(socket, error, "CalculateDmsVid", {
|
handleFortellisApiError(socket, error, "CalculateDmsVid", {
|
||||||
vin: JobData.v_vin,
|
vin: JobData.v_vin,
|
||||||
|
|||||||
Reference in New Issue
Block a user