Skip to content

Commit 42752c9

Browse files
committed
fix NLSys test
1 parent 97a1331 commit 42752c9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/systems/diffeqs/odesystem.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,10 @@ function convert_system(::Type{<:ODESystem}, sys, t; name=nameof(sys))
377377
end
378378
end
379379
sub = Base.Fix2(substitute, varmap)
380-
iv = only(independent_variables(sys))
381-
sub.x[iv] = t # otherwise the Differentials aren't fixed
380+
if sys isa AbstractODESystem
381+
iv = only(independent_variables(sys))
382+
sub.x[iv] = t # otherwise the Differentials aren't fixed
383+
end
382384
neweqs = map(sub, equations(sys))
383385
defs = Dict(sub(k) => sub(v) for (k, v) in defaults(sys))
384386
return ODESystem(neweqs, t, newsts, parameters(sys); defaults=defs, name=name, checks=false)

0 commit comments

Comments
 (0)