Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
albertomercurio committed Oct 15, 2024
1 parent f831aee commit 356354f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/preset_time.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function PresetTimeCallback(tstops, user_affect!;
throw(ArgumentError("tstops must either be a number or a Vector. Was $tstops"))
end

tstops = sort_inplace ? sort!(tstops) : sort(tstops)
tstops = tstops isa Number ? [tstops] : (sort_inplace ? sort!(tstops) : sort(tstops))

condition = let
function (u, t, integrator)
Expand Down Expand Up @@ -57,7 +57,7 @@ function PresetTimeCallback(tstops, user_affect!;
else
_tstops = tstops
end
for tstop in tstops
for tstop in _tstops
add_tstop!(integrator, tstop)
end
if t tstops
Expand Down

0 comments on commit 356354f

Please sign in to comment.