Skip to content

Commit 58e917f

Browse files
fix: fix unPre for arrays and non-BasicSymbolic parameters
1 parent 1f55c5c commit 58e917f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/systems/callbacks.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ Base.show(io::IO, x::Pre) = print(io, "Pre")
6363
input_timedomain(::Pre, _ = nothing) = ContinuousClock()
6464
output_timedomain(::Pre, _ = nothing) = ContinuousClock()
6565
unPre(x::Num) = unPre(unwrap(x))
66-
unPre(x::BasicSymbolic) = (iscall(x) && operation(x) isa Pre) ? only(arguments(x)) : x
66+
unPre(x::Symbolics.Arr) = unPre(unwrap(x))
67+
unPre(x::Symbolic) = (iscall(x) && operation(x) isa Pre) ? only(arguments(x)) : x
6768

6869
function (p::Pre)(x)
6970
iw = Symbolics.iswrapped(x)

0 commit comments

Comments
 (0)