Skip to content

Commit

Permalink
Fix NativeWrapper check in nodeMatchesText
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Jul 12, 2016
1 parent 751a7eb commit 032c461
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/nodeMatchesText.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import type Store from './Store';

function nodeMatchesText(node: Map, needle: string, key: string, store: Store): boolean {
var name = node.get('name');
if (node.get('nodeType') === 'Native' && store.get(store.getParent(key)).get('nodeType') === 'NativeWrapper') {
var wrapper = store.get(store.getParent(key));
if (node.get('nodeType') === 'Native' && wrapper && wrapper.get('nodeType') === 'NativeWrapper') {
return false;
}
if (name) {
Expand Down

0 comments on commit 032c461

Please sign in to comment.