• Robert Knight's avatar
    Handle case where `nodeFromXPath` returns a non-Element result · 275ea593
    Robert Knight authored
    Handle scenarios flagged by type checking where `nodeFromXPath` may
    return `null` or a non-Element node. Previously it could never return
    `null` but would throw an exception if the node was not found. In the
    new code a check is needed.
    
    The case where `nodeFromXPath` returned a non-Element node would never
    happen with XPaths generated by the client but could happen if an
    annotation was created via the API with a non-simple XPath.
    275ea593
range.js 14 KB