Skip to content

Commit

Permalink
Fix StringSink writing null
Browse files Browse the repository at this point in the history
  • Loading branch information
Noobware1 committed Mar 27, 2024
1 parent 1700dac commit bf841d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/eval/shared/stdlib/io/string_sink.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ class $StringSink implements $Instance {

static $Value? _writeln(Runtime runtime, $Value? target, List<$Value?> args) {
final object = args[0];
(target!.$value as StringSink).writeln(runtime.valueToString(object));
(target!.$value as StringSink)
.writeln(object == null ? "" : runtime.valueToString(object));
return null;
}

Expand Down

0 comments on commit bf841d0

Please sign in to comment.