Skip to content

Commit

Permalink
Merge pull request #132 from ShellAddicted/v8HandleReplace
Browse files Browse the repository at this point in the history
fix for Electron v5+
  • Loading branch information
LinusU authored May 7, 2019
2 parents f365fc8 + d202f84 commit 0511f01
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ NAN_METHOD(Close) {
info.GetReturnValue().Set(scope.Escape(Nan::New<v8::Integer>(r)));
}

void Initialize(Handle<Object> target) {
/*
<<in 2014, the V8 team deprecated v8::Handle in favor of v8::Local>>
src: https://electronjs.org/blog/nodejs-native-addons-and-electron-5
*/
void Initialize(Local<Object> target) {
Nan::HandleScope scope;
Nan::ForceSet(target,
Nan::New("api_version").ToLocalChecked(),
Expand Down

0 comments on commit 0511f01

Please sign in to comment.