Closed RobinJayaswal closed 7 years ago
missing the 'new' keyword. Try:
var vehicle = new smartcar.Vehicle(vehicle_id, access.access_token);
constructors should throw error if not called with new
function Vehicle(...) {
if (!(this instanceof Vehicle) throw Error()
}
The following code worked to return vehicle objects before the update:
I see from the README this is no longer the way to do it, and changed the code to:
However, vehicle is now undefined, even right after I go through the OAuth process and have a completely new access token in hand.