Skip to content

Commit

Permalink
fix: only return fully valid rules
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Sep 22, 2022
1 parent c7b04ee commit 49f3573
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion redirects.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ func Parse(r io.Reader) (rules []Rule, err error) {
}

err = s.Err()
return
if err != nil {
return nil, err
}
return rules, nil
}

// ParseString parses the given string.
Expand Down

0 comments on commit 49f3573

Please sign in to comment.