Skip to content

Commit 2b70c02

Browse files
nsicchaclaude
andcommitted
Fix __status__/__substatus__ wiring to work with default compute_property fallbacks
The haskey(meta, :__substatus__) and hasproperty(o, :__status__) checks prevented substatus wiring from activating when using the new default compute_property fallbacks (which aren't in meta). Now always wire substatus for ThreadsafeDict getindex, since the defaults handle the nil case. Also remove debugging |> error in TreebarsExt. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a60d6c1 commit 2b70c02

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/DynamicObjects.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ Base.show(io::IO, c::ThreadsafeDict{K,V}) where {K,V} = lock(c.lock) do
9090
end
9191
Base.getindex(ip::IndexableProperty{name,<:Any,<:ThreadsafeDict}, indices...; fetch=Base.fetch, retry_failed=true, kwargs...) where {name} = begin
9292
(;o, cache) = ip
93-
substatus_f = if name != :__substatus__ && name != :__status__ && haskey(meta(typeof(o)), :__substatus__)
93+
substatus_f = if name != :__substatus__ && name != :__status__
9494
() -> begin
95-
root = hasproperty(o, :__status__) ? o.__status__ : nothing
95+
root = o.__status__
9696
compute_property(o, Val(:__substatus__), name, indices...; __status__=root, kwargs...)
9797
end
9898
else

0 commit comments

Comments
 (0)