From faaa31b0d543816552e893908a320fb20be1587c Mon Sep 17 00:00:00 2001 From: James Onnen Date: Thu, 2 May 2024 17:54:32 -0700 Subject: [PATCH] fix: Better warrning and error messsages --- src/statestack/src/Shared/RxStateStackUtils.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/statestack/src/Shared/RxStateStackUtils.lua b/src/statestack/src/Shared/RxStateStackUtils.lua index b9c2813162..a82169a813 100644 --- a/src/statestack/src/Shared/RxStateStackUtils.lua +++ b/src/statestack/src/Shared/RxStateStackUtils.lua @@ -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