Skip to content

Commit fb55fc4

Browse files
trop[bot]miniak
andauthored
fix: defaults broken in shell.openExternal() options (#38072)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Milan Burda <miburda@microsoft.com>
1 parent c91dc20 commit fb55fc4

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

shell/common/api/electron_api_shell.cc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,11 @@ v8::Local<v8::Promise> OpenExternal(const GURL& url, gin::Arguments* args) {
5959
v8::Local<v8::Promise> handle = promise.GetHandle();
6060

6161
platform_util::OpenExternalOptions options;
62-
if (args->Length() >= 2) {
63-
gin::Dictionary obj(nullptr);
64-
if (args->GetNext(&obj)) {
65-
obj.Get("activate", &options.activate);
66-
obj.Get("workingDirectory", &options.working_dir);
67-
obj.Get("logUsage", &options.log_usage);
68-
}
62+
gin_helper::Dictionary obj;
63+
if (args->GetNext(&obj)) {
64+
obj.Get("activate", &options.activate);
65+
obj.Get("workingDirectory", &options.working_dir);
66+
obj.Get("logUsage", &options.log_usage);
6967
}
7068

7169
platform_util::OpenExternal(

0 commit comments

Comments
 (0)