Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
fix(clientsidescripts): make findByCssContainingText tolerate element…
Browse files Browse the repository at this point in the history
…s with no textContent/innerText
  • Loading branch information
spautz authored and sjelin committed Nov 17, 2014
1 parent dfa97ce commit 47f12ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/clientsidescripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ functions.findByCssContainingText = function(cssSelector, searchText, using) {
var matches = [];
for (var i = 0; i < elements.length; ++i) {
var element = elements[i];
var elementText = element.textContent || element.innerText;
var elementText = element.textContent || element.innerText || '';
if (elementText.indexOf(searchText) > -1) {
matches.push(element);
}
Expand Down

0 comments on commit 47f12ba

Please sign in to comment.