1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:17:44 +00:00

LibJS: Don't use null DFS in {Import,Export}Entry

This commit is contained in:
Dan Klishch 2024-01-24 14:45:11 -05:00 committed by Andrew Kaster
parent 78491204d9
commit fb2c929310
4 changed files with 36 additions and 39 deletions

View file

@ -1530,8 +1530,8 @@ void ExportStatement::dump(int indent) const
print_indent(indent + 1);
outln("(ExportEntries)");
auto string_or_null = [](ByteString const& string) -> ByteString {
if (string.is_empty()) {
auto string_or_null = [](Optional<DeprecatedFlyString> const& string) -> ByteString {
if (!string.has_value()) {
return "null";
}
return ByteString::formatted("\"{}\"", string);