Skip to content

Commit

Permalink
Merge pull request gocolly#382 from husniadil/patch-1
Browse files Browse the repository at this point in the history
Fix MAX_DEPTH variable assignment
  • Loading branch information
asciimoo authored Nov 15, 2019
2 parents bc8c97a + ade4a0e commit a20f330
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion colly.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ var envMap = map[string]func(*Collector, string){
},
"MAX_DEPTH": func(c *Collector, val string) {
maxDepth, err := strconv.Atoi(val)
if err != nil {
if err == nil {
c.MaxDepth = maxDepth
}
},
Expand Down

0 comments on commit a20f330

Please sign in to comment.