Skip to content

Commit

Permalink
allow null in compute for weak mode (flutter#63515)
Browse files Browse the repository at this point in the history
  • Loading branch information
a14n authored and mingwandroid committed Sep 6, 2020
1 parent 165372e commit 093f169
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/foundation/_isolates_io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Future<R> compute<Q, R>(isolates.ComputeCallback<Q, R> callback, Q message, { St
}
});
resultPort.listen((dynamic resultData) {
assert(resultData is R);
assert(resultData == null || resultData is R);
if (!result.isCompleted)
result.complete(resultData as R);
});
Expand Down

0 comments on commit 093f169

Please sign in to comment.