Fix node bindings and test cases that would've caught it.

This commit is contained in:
Daniel Patterson
2019-02-10 02:36:16 -08:00
parent 986252c4f9
commit a89d0e616f
2 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -728,7 +728,7 @@ inline bool argumentsToParameter(const Nan::FunctionCallbackInfo<v8::Value> &arg
if (acceleration_profile.IsEmpty())
return false;
if (!acceleration_profile->IsNumber() || !acceleration_profile->IsString())
if (!acceleration_profile->IsNumber() && !acceleration_profile->IsString())
{
Nan::ThrowError("acceleration_profile must be a decimal number or one of 'car', 'fast_car', 'slow_car', 'truck', or 'tractor_trailer'");
return false;