@eiannone/tesla-api 1.13.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/TeslaApi.js +4 -1
- package/package.json +1 -1
package/TeslaApi.js
CHANGED
|
@@ -247,7 +247,10 @@ class TeslaApi {
|
|
|
247
247
|
return this.#apiCall().then(vehicles => {
|
|
248
248
|
for (let v = 0; v < vehicles.length; v++) {
|
|
249
249
|
if (!vehicles[v].hasOwnProperty('vehicle_id') || !vehicles[v].hasOwnProperty('id_s')) continue;
|
|
250
|
-
if (vehicles[v].vehicle_id == vehicle_id)
|
|
250
|
+
if (vehicles[v].vehicle_id == vehicle_id) {
|
|
251
|
+
this.vid = vehicles[v].id_s;
|
|
252
|
+
return this.vid;
|
|
253
|
+
}
|
|
251
254
|
}
|
|
252
255
|
throw new ApiError("Vehicle not found");
|
|
253
256
|
});
|