diff --git a/src/Document.js b/src/Document.js index c0f675b..9b170a5 100644 --- a/src/Document.js +++ b/src/Document.js @@ -120,7 +120,7 @@ get(xpath) { const found = this.find(xpath); - if (!found.length) return found; // found is not an array so we just return it. + if (found.length === undefined) return found; // found is not an array so we just return it. if (found.length === 0) return null; // found is an empty array so we return null. return found[0]; // found is a non-empty array so we return the first element.