Skip to content

Commit

Permalink
Not only Firefox can throw TypeError on passing customized ns resolve…
Browse files Browse the repository at this point in the history
…r, old IEs throw too
  • Loading branch information
barancev committed Nov 5, 2014
1 parent 67ff2b8 commit b7cbc37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascript/atoms/locators/xpath.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ bot.locators.xpath.evaluate_ = function(node, path, resultType) {
try {
return doc.evaluate(path, node, resolver, resultType, null);
} catch (te) {
if (goog.userAgent.GECKO && te.name === 'TypeError') {
if (te.name === 'TypeError') {
return doc.evaluate(path, node, doc.createNSResolver(doc.documentElement), resultType, null);
} else {
throw te;
Expand Down

0 comments on commit b7cbc37

Please sign in to comment.