Skip to content

Commit 2ebd807

Browse files
committed
Meta: Avoid outputting stray closing bracket in IDL code generation
1 parent e56fd68 commit 2ebd807

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2216,7 +2216,7 @@ static void generate_wrap_statement(SourceGenerator& generator, ByteString const
22162216
@result_expression@ JS::js_null();
22172217
}
22182218
)~~~");
2219-
} else if (is_optional) {
2219+
} else if (is_optional && !is<UnionType>(type)) {
22202220
// Optional return values should not be assigned any value (including null) if the value is not present.
22212221
scoped_generator.append(R"~~~(
22222222
}

0 commit comments

Comments
 (0)