Skip to content

Commit 7f37457

Browse files
fix: don't toparam inside Initial
1 parent b150fe2 commit 7f37457

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/systems/abstractsystem.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,14 +648,14 @@ function (f::Initial)(x)
648648
iscall(x) && operation(x) isa Initial && return x
649649
result = if symbolic_type(x) == ArraySymbolic()
650650
# create an array for `Initial(array)`
651-
Symbolics.array_term(f, toparam(x))
651+
Symbolics.array_term(f, x)
652652
elseif iscall(x) && operation(x) == getindex
653653
# instead of `Initial(x[1])` create `Initial(x)[1]`
654654
# which allows parameter indexing to handle this case automatically.
655655
arr = arguments(x)[1]
656-
term(getindex, f(toparam(arr)), arguments(x)[2:end]...)
656+
term(getindex, f(arr), arguments(x)[2:end]...)
657657
else
658-
term(f, toparam(x))
658+
term(f, x)
659659
end
660660
# the result should be a parameter
661661
result = toparam(result)

0 commit comments

Comments
 (0)