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
commit fb2c929310
Notes: sideshowbarker 2024-07-17 07:14:09 +09:00
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);