Skip to content

Commit

Permalink
Add nil check in GetLatest (fix #71)
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed Jan 26, 2021
1 parent 41cce90 commit d29ddc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wrappedclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (wc *WrappedClient) GetLatest(ctx context.Context, procOpt ProcessingOption

// constrain the pull to the recent timeframe
timeframe := Timeframe{Until: procOpt.Timeframe.Until}
if mostRecentTimestamp > 0 {
if mostRecentTimestamp > 0 && timeframe.Until != nil {
ts := time.Unix(mostRecentTimestamp, 0)
timeframe.Since = &ts
if timeframe.Until.Before(ts) {
Expand Down

0 comments on commit d29ddc3

Please sign in to comment.