fix: correctly convert MessageBoxType (#19349)

This commit is contained in:
Shelley Vohr 2019-07-22 08:19:24 -07:00 committed by GitHub
parent 526f9d442d
commit 0490189531
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,7 @@ bool Converter<electron::MessageBoxSettings>::FromV8(
if (!ConvertFromV8(isolate, val, &dict)) if (!ConvertFromV8(isolate, val, &dict))
return false; return false;
dict.Get("window", &out->parent_window); dict.Get("window", &out->parent_window);
dict.Get("type", &type); dict.Get("messageBoxType", &type);
out->type = static_cast<electron::MessageBoxType>(type); out->type = static_cast<electron::MessageBoxType>(type);
dict.Get("buttons", &out->buttons); dict.Get("buttons", &out->buttons);
dict.Get("defaultId", &out->default_id); dict.Get("defaultId", &out->default_id);