Update xpath dependency (#507)

This commit is contained in:
WithoutPants
2020-04-30 08:32:33 +10:00
committed by GitHub
parent 3d22d5a742
commit 2166caf322
288 changed files with 34566 additions and 82048 deletions

View File

@@ -2,6 +2,7 @@ package xpath
import (
"errors"
"fmt"
)
// NodeType represents a type of XPath node.
@@ -144,6 +145,9 @@ func Compile(expr string) (*Expr, error) {
if err != nil {
return nil, err
}
if qy == nil {
return nil, fmt.Errorf(fmt.Sprintf("undeclared variable in XPath expression: %s", expr))
}
return &Expr{s: expr, q: qy}, nil
}