Skip to content

Commit

Permalink
Fix some linting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
nhunzaker committed Nov 19, 2016
1 parent 4a066ec commit dd4850e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('SimpleEventPlugin', function() {
it('does not trigger captured click events when target is a disabled element', function() {
var element = ReactTestUtils.renderIntoDocument(
<div onClickCapture={onClick}>
<button disabled={true}></button>
<button disabled={true} />
</div>
);
var button = ReactDOM.findDOMNode(element).querySelector('button');
Expand Down
7 changes: 3 additions & 4 deletions src/renderers/shared/shared/ReactTreeTraversal.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,9 @@ function shouldIgnoreElement(inst) {
}

function traverseTwoPhase(inst, fn, arg) {
// Do not traverse an tree that originates with a disabled
// element
// Do not traverse an tree that originates with a disabled element
if (shouldIgnoreElement(inst)) {
return
return false;
}

var path = [];
Expand All @@ -128,7 +127,7 @@ function traverseTwoPhase(inst, fn, arg) {
// walking from parent to child
for (i = path.length; i-- > 0;) {
// Are we currently, our about to be, within a disabled tree
disabled = disabled || shouldIgnoreElement(path[i])
disabled = disabled || shouldIgnoreElement(path[i]);
// If so, remove the current element from traversion if it
// is interactive
if (disabled && isInteractive(path[i])) {
Expand Down

0 comments on commit dd4850e

Please sign in to comment.