From d8fc7d81b7cbeb9412ee0914b3fe4a791199d806 Mon Sep 17 00:00:00 2001 From: Selim Mustafaev Date: Mon, 7 Sep 2020 14:51:24 +0300 Subject: [PATCH] Proper fix for unknown steering wheel position --- models/vehicle.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/models/vehicle.js b/models/vehicle.js index ae6a49e..e219690 100644 --- a/models/vehicle.js +++ b/models/vehicle.js @@ -1,5 +1,4 @@ const Constants = require('../data_providers/constants'); -const Event = require('./event'); class Vehicle { brand @@ -48,7 +47,13 @@ class Vehicle { url: p.uri }; }); - v.isRightWheel = tech?.wheel?.position == 'RIGHT'; + + if(tech?.wheel?.position) { + v.isRightWheel = tech?.wheel?.position == 'RIGHT'; + } else { + v.isRightWheel = null; + } + v.isJapanese = report.is_japanese_vehicle; v.addedDate = Date.now(); v.events = [];