Skip to content

Commit 2c14c75

Browse files
fix: fix independent_variables
1 parent e818b97 commit 2c14c75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/systems/abstractsystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ function independent_variables(sys::AbstractSystem)
236236
if !(sys isa System)
237237
@warn "Please declare ($(typeof(sys))) as a subtype of `AbstractTimeDependentSystem`, `AbstractTimeIndependentSystem` or `AbstractMultivariateSystem`."
238238
end
239-
if isdefined(sys, :iv)
239+
if isdefined(sys, :iv) && getfield(sys, :iv) !== nothing
240240
return [getfield(sys, :iv)]
241241
elseif isdefined(sys, :ivs)
242242
return getfield(sys, :ivs)

0 commit comments

Comments
 (0)