updates for node 12
This commit is contained in:
parent
1fb87351a5
commit
91732dd208
|
@ -4,6 +4,6 @@
|
|||
"private": true,
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"addon-tools-raub": "https://github.com/node-3d/addon-tools-raub.git"
|
||||
"addon-tools-raub": "1.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"private": true,
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"addon-tools-raub": "https://github.com/node-3d/addon-tools-raub.git"
|
||||
"addon-tools-raub": "1.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -276,7 +276,7 @@ inline void *getData(V8_VAR_OBJ obj) {
|
|||
|
||||
if (obj->IsArrayBufferView()) {
|
||||
pixels = getArrayData<unsigned char>(obj);
|
||||
} else if (obj->Has(JS_STR("data"))) {
|
||||
} else if (obj->Has(Nan::GetCurrentContext(), JS_STR("data")).ToChecked()) {
|
||||
V8_VAR_VAL data = Nan::Get(obj, JS_STR("data")).ToLocalChecked();
|
||||
if ( ! data->IsNullOrUndefined() ) {
|
||||
pixels = node::Buffer::Data(data);
|
||||
|
|
|
@ -212,7 +212,7 @@ private:
|
|||
|
||||
REQ_OBJ_ARG(0, event);
|
||||
|
||||
if ( ! event->Has(JS_STR("type")) ) {
|
||||
if ( ! event->Has(Nan::GetCurrentContext(), JS_STR("type")).ToChecked() ) {
|
||||
return Nan::ThrowError("Event must have the `type` property.");
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,6 @@
|
|||
"url": "https://github.com/node-3d/addon-tools-raub.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"nan": "2.12.1"
|
||||
"nan": "2.14.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"start": "mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"addon-tools-raub": "https://github.com/node-3d/addon-tools-raub.git",
|
||||
"addon-tools-raub": "1.0.0",
|
||||
"chai": "^4.2.0",
|
||||
"mocha": "^5.2.0",
|
||||
"sinon": "^7.1.1"
|
||||
|
|
Loading…
Reference in New Issue