File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -372,15 +372,15 @@ function ModelingToolkit.get_variables!(set, rx::Reaction)
372
372
Main. infiltrate (@__MODULE__ , Base. @locals , @__FILE__ , @__LINE__ )
373
373
end
374
374
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)
377
377
for stoichs in (rx. substoich, rx. prodstoich), stoich in stoichs
378
378
(stoich isa BasicSymbolic) && get_variables! (set, stoich)
379
379
end
380
380
if has_noise_scaling (rx)
381
381
get_variables! (set, get_noise_scaling (rx))
382
382
end
383
- return unique! (set)
383
+ return (set isa AbstractVector) ? unique! (set) : set
384
384
end
385
385
386
386
# ## Dependency-related Functions ###
You can’t perform that action at this time.
0 commit comments