File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2600,8 +2600,10 @@ end
2600
2600
2601
2601
keytype (:: Type{<:Pair{T, V}} ) where {T, V} = T
2602
2602
function Symbolics. substitute (sys:: AbstractSystem , rules:: Union{Vector{<:Pair}, Dict} )
2603
- if has_continuous_domain (sys) && get_continuous_events (sys) != = nothing ||
2604
- has_discrete_events (sys) && get_discrete_events (sys) != = nothing
2603
+ if has_continuous_domain (sys) && get_continuous_events (sys) != = nothing &&
2604
+ ! isempty (get_continuous_events (sys)) ||
2605
+ has_discrete_events (sys) && get_discrete_events (sys) != = nothing &&
2606
+ ! isempty (get_discrete_events (sys))
2605
2607
@warn " `substitute` only supports performing substitutions in equations. This system has events, which will not be updated."
2606
2608
end
2607
2609
if keytype (eltype (rules)) <: Symbol
You can’t perform that action at this time.
0 commit comments