mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
Fix an off-by-one error
This commit is contained in:
parent
0f6500cf2d
commit
9bebea8225
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ struct Month: Equatable {
|
|||
let number: Int
|
||||
|
||||
init?(_ number: Int) {
|
||||
guard number < Month.all.count else {
|
||||
guard (1 ... Month.all.count).contains(number) else {
|
||||
return nil
|
||||
}
|
||||
self.number = number
|
||||
|
|
|
|||
Loading…
Reference in a new issue