fix: defaults broken in shell.openExternal() options (#38038)

Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
Milan Burda 2023-04-21 19:13:59 +02:00 committed by GitHub
parent f727da4a74
commit 964934c161
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,14 +59,12 @@ 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);
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(
url, options, base::BindOnce(&OnOpenFinished, std::move(promise)));