diff --git a/lib/Tour.md b/lib/Tour.md index b43054d..9461adf 100644 --- a/lib/Tour.md +++ b/lib/Tour.md @@ -32,7 +32,7 @@ local myFunction() return Promise.new(function(resolve, reject, onCancel) local connection - someEvent:Connect(function(...) + connection = someEvent:Connect(function(...) connection:Disconnect() resolve(...) end) @@ -179,4 +179,4 @@ If a cancelled Promise has any consumers itself, those Promises are also cancell Resolving a Promise with a Promise will cause the resolving Promise to become a consumer of the chained Promise, so if the chained Promise becomes cancelled then the resolving Promise will also become cancelled. -If you call `resolve` with a Promise within a Promise which is already cancelled, the passed Promise will be cancelled if it has no other consumers as an optimization. \ No newline at end of file +If you call `resolve` with a Promise within a Promise which is already cancelled, the passed Promise will be cancelled if it has no other consumers as an optimization.