Skip to content
This repository has been archived by the owner on May 22, 2018. It is now read-only.

Commit

Permalink
Fix type warning
Browse files Browse the repository at this point in the history
Fix type warning revealed by improved array-like object
type checking in the Closure Compiler.

Signed-off-by: Luke Inman-Semerau <luke.semerau@gmail.com>
  • Loading branch information
joshbruning authored and lukeis committed Feb 18, 2016
1 parent 1bc044a commit 9b11f1f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions javascript/selenium-atoms/se_locators.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,12 @@ core.locators.elementFindFirstMatchingChild = function(element, selector) {
for (var i = 0; i < childCount; i++) {
var child = element.childNodes[i];
if (child.nodeType == goog.dom.NodeType.ELEMENT) {
if (selector(child)) {
return child;
var childEl = /** @type {!Element} */ (child);
if (selector(childEl)) {
return childEl;
}
var result = core.locators.elementFindFirstMatchingChild(child, selector);
var result = core.locators.elementFindFirstMatchingChild(
childEl, selector);
if (result) {
return result;
}
Expand Down

0 comments on commit 9b11f1f

Please sign in to comment.