Skip to content

Commit

Permalink
fix(gronx): use new Checker for IsValid
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Feb 2, 2024
1 parent cd40b01 commit d3b6afc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gronx.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ func (g *Gronx) IsValid(expr string) bool {
return false
}

g.C.SetRef(time.Now())
c := &SegmentChecker{ref: time.Now()}
for pos, seg := range segs {
if _, err := g.C.CheckDue(seg, pos); err != nil {
if _, err := c.CheckDue(seg, pos); err != nil {
return false
}
}
Expand Down

0 comments on commit d3b6afc

Please sign in to comment.