Skip to content

Commit b18d91c

Browse files
authored
fix build for node version 10 (dependency upgrade -> "nan": "^2.10.0")
I just found this similar issue and fix in another package here: noble/node-bluetooth-hci-socket#84 (comment) The same seems to work here, to make it build with Node v10. Hope it does not break anything with earlier versions, as long as they update the NaN dependency to ^2.10.
1 parent c89fc32 commit b18d91c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libxml.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ NAN_METHOD(Libxml::New) {
7070
const int argc = 1;
7171
Local<Value> argv[argc] = {info[0]};
7272
Local<Function> cons = Nan::New(constructor());
73-
info.GetReturnValue().Set(cons->NewInstance(argc, argv));
73+
info.GetReturnValue().Set(Nan::NewInstance(cons, argc, argv).ToLocalChecked());
7474
}
7575
}
7676

0 commit comments

Comments
 (0)