Skip to content

Commit

Permalink
fix: pass down the bool value of enableAutoSize to setSize (#13282)
Browse files Browse the repository at this point in the history
* fix: pass the boolean value of enableAutoSize to setSize

The webContents setSize API takes in an optional enableAutoSize boolean.
Looking in the code, if that property is set, regardless if you pass in
true or false, it will always set it to true. This change passes the
appropriate boolean value down properly.

* creating new bool for autosize
  • Loading branch information
jguze authored and ckerr committed Jun 19, 2018
1 parent 13f97b4 commit 137aaf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_web_contents.cc
Expand Up @@ -130,7 +130,7 @@ struct Converter<atom::SetSizeParams> {
return false;
bool autosize;
if (params.Get("enableAutoSize", &autosize))
out->enable_auto_size.reset(new bool(true));
out->enable_auto_size.reset(new bool(autosize));
gfx::Size size;
if (params.Get("min", &size))
out->min_size.reset(new gfx::Size(size));
Expand Down

0 comments on commit 137aaf2

Please sign in to comment.