We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13ff006 commit d89115bCopy full SHA for d89115b
cc/modules/imgproc/imgproc.cc
@@ -123,8 +123,8 @@ NAN_METHOD(Imgproc::CalcHist) {
123
ranges.push_back(new float[dims]);
124
FF_OBJ jsAxis = FF_CAST_OBJ(jsHistAxes->Get(i));
125
FF_ARR jsRanges;
126
-
127
- if (!jsRanges->Length() == 2) {
+ FF_GET_ARRAY_REQUIRED(jsAxis, jsRanges, "ranges");
+ if (jsRanges->Length() != 2) {
128
return Nan::ThrowError(FF_NEW_STRING("expected ranges to be an array of length " + std::to_string(2)));
129
}
130
ranges.at(i)[0] = jsRanges->Get(0)->NumberValue();
0 commit comments