Proper fix for unknown steering wheel position

This commit is contained in:
Selim Mustafaev 2020-09-07 14:51:24 +03:00
parent 196c287124
commit d8fc7d81b7

View File

@ -1,5 +1,4 @@
const Constants = require('../data_providers/constants'); const Constants = require('../data_providers/constants');
const Event = require('./event');
class Vehicle { class Vehicle {
brand brand
@ -48,7 +47,13 @@ class Vehicle {
url: p.uri url: p.uri
}; };
}); });
if(tech?.wheel?.position) {
v.isRightWheel = tech?.wheel?.position == 'RIGHT'; v.isRightWheel = tech?.wheel?.position == 'RIGHT';
} else {
v.isRightWheel = null;
}
v.isJapanese = report.is_japanese_vehicle; v.isJapanese = report.is_japanese_vehicle;
v.addedDate = Date.now(); v.addedDate = Date.now();
v.events = []; v.events = [];