Skip to content

Commit 8bca45b

Browse files
committed
rebase fix
1 parent a55f782 commit 8bca45b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/reaction.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,15 +372,15 @@ function ModelingToolkit.get_variables!(set, rx::Reaction)
372372
Main.infiltrate(@__MODULE__, Base.@locals, @__FILE__, @__LINE__)
373373
end
374374
get_variables!(set, rx.rate)
375-
append!(set, rx.substrates)
376-
append!(set, rx.products)
375+
foreach(sub -> push!(set, sub), rx.substrates)
376+
foreach(prod -> push!(set, prod), rx.products)
377377
for stoichs in (rx.substoich, rx.prodstoich), stoich in stoichs
378378
(stoich isa BasicSymbolic) && get_variables!(set, stoich)
379379
end
380380
if has_noise_scaling(rx)
381381
get_variables!(set, get_noise_scaling(rx))
382382
end
383-
return unique!(set)
383+
return (set isa AbstractVector) ? unique!(set) : set
384384
end
385385

386386
### Dependency-related Functions ###

0 commit comments

Comments
 (0)