1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:57:35 +00:00

LibWeb: Emit optional boolean variable definition in WrapperGenerator

The removed if in this commit was inside the else branch of an if with
the same condition, making it a no-op, as well as breaking optional
booleans.
This commit is contained in:
Idan Horowitz 2021-04-15 20:32:15 +03:00 committed by Andreas Kling
parent dbc5b05b7a
commit 0072581693

View file

@ -615,11 +615,9 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
bool @cpp_name@;
)~~~");
} else {
if (!optional_default_value.is_null()) {
scoped_generator.append(R"~~~(
scoped_generator.append(R"~~~(
Optional<bool> @cpp_name@;
)~~~");
}
}
scoped_generator.append(R"~~~(
if (!@js_name@@js_suffix@.is_undefined())