Skip to content

Commit c0abc56

Browse files
fix: run additional passes before setting the parent of the system
1 parent 41600b1 commit c0abc56

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/systems/systems.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ function structural_simplify(
4646
not yet supported.
4747
""")
4848
end
49+
for pass in additional_passes
50+
newsys = pass(newsys)
51+
end
4952
if newsys isa ODESystem || has_parent(newsys)
5053
@set! newsys.parent = complete(sys; split, flatten = false)
5154
end
52-
for pass in additional_passes
53-
newsys = pass(newsys)
54-
end
5555
newsys = complete(newsys; split)
5656
if has_defaults(newsys) && (defs = get_defaults(newsys)) !== nothing
5757
ks = collect(keys(defs)) # take copy to avoid mutating defs while iterating.

0 commit comments

Comments
 (0)