Index: pkg/scheduled_test/lib/src/utils.dart |
diff --git a/pkg/scheduled_test/lib/src/utils.dart b/pkg/scheduled_test/lib/src/utils.dart |
index 6e4c636d03b5d3ef78fe06d8d3bc4d7ea959da78..4bd4505f8aefc57f8b88ba0bab43a05b77d813f1 100644 |
--- a/pkg/scheduled_test/lib/src/utils.dart |
+++ b/pkg/scheduled_test/lib/src/utils.dart |
@@ -35,6 +35,7 @@ void chainToCompleter(Future future, Completer completer) { |
/// Prepends each line in [text] with [prefix]. If [firstPrefix] is passed, the |
/// first line is prefixed with that instead. |
String prefixLines(String text, {String prefix: '| ', String firstPrefix}) { |
+ if (text == null) return ''; |
Bob Nystrom
2013/05/01 16:03:17
Why is this change needed?
Søren Gjesse
2013/05/01 17:38:35
I got an exception that text was null, which was h
nweiz
2013/05/06 17:19:47
[prefixLines] shouldn't do manual null-checking (a
Søren Gjesse
2013/05/13 13:10:57
If you undo this change and the change to sdk/lib/
|
var lines = text.split('\n'); |
if (firstPrefix == null) { |
return lines.map((line) => '$prefix$line').join('\n'); |