Skip to content

Commit

Permalink
fix: Better warrning and error messsages
Browse files Browse the repository at this point in the history
  • Loading branch information
Quenty committed May 3, 2024
1 parent d1a2804 commit faaa31b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/statestack/src/Shared/RxStateStackUtils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ function RxStateStackUtils.topOfStack(defaultValue)
return function(source)
return Observable.new(function(sub)
local maid = Maid.new()

local current = StateStack.new(defaultValue)
maid:GiveTask(current)
local current = maid:Add(StateStack.new(defaultValue))

maid:GiveTask(source:Subscribe(function(brio)
if not Brio.isBrio(brio) then
warn("Not a brio")
warn("[RxStateStackUtils.topOfStack] - Not a brio. Ignoring.")
return
end

Expand Down

0 comments on commit faaa31b

Please sign in to comment.