Skip to content
This repository was archived by the owner on Aug 30, 2020. It is now read-only.

Commit 3a24c57

Browse files
committed
fix useChrome bug
1 parent edefec2 commit 3a24c57

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

handlers/create.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,16 @@ func Create(c echo.Context) error {
2525
}
2626

2727
var (
28-
content string
29-
ok bool
28+
content string
29+
ok bool
30+
useChrome = true
3031
)
3132

3233
if req.Options.UseChrome == nil || !*req.Options.UseChrome {
3334
content, ok = trackers.SimpleTracker(&req.URL, &req.XPATH)
3435
}
3536
if !ok {
36-
*req.Options.UseChrome = true
37+
req.Options.UseChrome = &useChrome
3738
log.Println("INFO: Resorting to Chrome")
3839
}
3940
if req.Options.UseChrome != nil && *req.Options.UseChrome {

0 commit comments

Comments
 (0)