Skip to content

Commit 194ef9b

Browse files
committed
Add type to avoid error when summarizing over an empty list
1 parent 17c09e1 commit 194ef9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Simulation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ end
319319
function rops(ssys::SystemSimulation, name, t)
320320
domains = getfield.(ssys.sims, :domain)
321321
ind = findfirst(isequal(name), ssys.names)
322-
Nrxns = sum([length(sim.domain.phase.reactions) for sim in ssys.sims]) + sum([length(inter.reactions) for inter in ssys.interfaces if hasproperty(inter, :reactions)])
322+
Nrxns = sum([length(sim.domain.phase.reactions) for sim in ssys.sims]) + sum(Vector{Int}([length(inter.reactions) for inter in ssys.interfaces if hasproperty(inter, :reactions)]))
323323
Nspcs = sum([length(getphasespecies(sim.domain.phase)) for sim in ssys.sims])
324324
cstot = zeros(Nspcs)
325325
vns = Array{Any,1}(undef, length(domains))

0 commit comments

Comments
 (0)