Fix var name

This commit is contained in:
Luis Blanco 2018-05-13 22:56:40 +03:00
parent d07c7d747e
commit 3a22850637
1 changed files with 2 additions and 2 deletions

View File

@ -234,12 +234,12 @@ inline Type* getArrayData(V8_VAR_OBJ obj, int *num = nullptr) {
*num = 0; *num = 0;
} }
if ( ! arg->IsArrayBufferView() ) { if ( ! obj->IsArrayBufferView() ) {
Nan::ThrowError("Argument must be a TypedArray."); Nan::ThrowError("Argument must be a TypedArray.");
return data; return data;
} }
v8::Local<v8::ArrayBufferView> arr = v8::Local<v8::ArrayBufferView>::Cast(arg); v8::Local<v8::ArrayBufferView> arr = v8::Local<v8::ArrayBufferView>::Cast(obj);
if (num) { if (num) {
*num = arr->ByteLength() / sizeof(Type); *num = arr->ByteLength() / sizeof(Type);
} }