Unverified Commit afc95099 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

allow null in compute for weak mode (#63515)

parent be868397
......@@ -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);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment