Skip to content

Commit

Permalink
Unified API
Browse files Browse the repository at this point in the history
  • Loading branch information
pacop committed Aug 31, 2020
1 parent 36bf853 commit aa8e9d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/c++/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ Napi::Value Window::GetParent(const Napi::CallbackInfo& info) {
if (parentHwnd == NULL) {
return info.Env().Undefined();
} else {
return Napi::Number::New(info.Env(), HandleToLong(parentHwnd));
return constructor.New({ Napi::Number::New(info.Env(), HandleToLong(parentHwnd)) });
}
}

Expand All @@ -325,7 +325,7 @@ Napi::Value Window::GetAncestor(const Napi::CallbackInfo& info) {
if (ancestorHwnd == NULL) {
return info.Env().Undefined();
} else {
return Napi::Number::New(info.Env(), HandleToLong(ancestorHwnd));
return constructor.New({ Napi::Number::New(info.Env(), HandleToLong(ancestorHwnd)) });
}
}

Expand Down

0 comments on commit aa8e9d6

Please sign in to comment.