Repository navigation
Fix Operator Subscription error
require "PLoop" (function(_ENV)
Logger.Default:AddHandler(print)
subject = Subject()
local ob
observable = Observable(function(observer)
return subject:Subscribe(observer)
end)
observable:Map("x => x ^ 2"):Dump()
subject:OnNext(1)
subject:OnNext(2)
end)For code like this, the operator(like Map)'s Subscription assignment is incorrect, will auto cancel the subscription, fixed.