Skip to content
This repository was archived by the owner on Aug 24, 2022. It is now read-only.

Commit 8cec982

Browse files
committed
Fixed calling awaiter with Task.FromResult
1 parent f073ad3 commit 8cec982

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

JSIL.Libraries/Includes/Bootstrap/Async/Classes/System.Threading.Tasks.Task.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ JSIL.ImplementExternals("System.Threading.Tasks.Task", function ($) {
142142
new JSIL.MethodSignature($jsilcore.TypeRef("System.Threading.Tasks.Task`1", ["!!0"]), ["!!0"], ["TResult"]),
143143
function(TResult, result) {
144144
var task = new ($jsilcore.System.Threading.Tasks.Task$b1.Of(TResult));
145-
task.status = $jsilcore.System.Threading.Tasks.TaskStatus.RanToCompletion;
146145
task.result = result;
146+
task.SetComplete();
147147
return task;
148148
}
149149
);

0 commit comments

Comments
 (0)