Skip to content

Commit

Permalink
fix: defaults broken in shell.openExternal() options (#38072)
Browse files Browse the repository at this point in the history
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Milan Burda <miburda@microsoft.com>
  • Loading branch information
trop[bot] and Milan Burda committed Apr 21, 2023
1 parent c91dc20 commit fb55fc4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions shell/common/api/electron_api_shell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,11 @@ v8::Local<v8::Promise> OpenExternal(const GURL& url, gin::Arguments* args) {
v8::Local<v8::Promise> handle = promise.GetHandle();

platform_util::OpenExternalOptions options;
if (args->Length() >= 2) {
gin::Dictionary obj(nullptr);
if (args->GetNext(&obj)) {
obj.Get("activate", &options.activate);
obj.Get("workingDirectory", &options.working_dir);
obj.Get("logUsage", &options.log_usage);
}
gin_helper::Dictionary obj;
if (args->GetNext(&obj)) {
obj.Get("activate", &options.activate);
obj.Get("workingDirectory", &options.working_dir);
obj.Get("logUsage", &options.log_usage);
}

platform_util::OpenExternal(
Expand Down

0 comments on commit fb55fc4

Please sign in to comment.