Skip to content

Commit

Permalink
Merge pull request react-bootstrap#914 from AlexKVal/fixWarnings
Browse files Browse the repository at this point in the history
Address eslint warnings
  • Loading branch information
AlexKVal committed Jun 29, 2015
2 parents 97ef415 + 9c682b6 commit 3131bc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ function onFocus(context, handler) {
let useFocusin = !doc.addEventListener;
let remove;

if ( currentFocusListener )
if ( currentFocusListener ) {
currentFocusListener.remove();
}

if (useFocusin) {
document.attachEvent('onfocusin', handler);
Expand All @@ -60,7 +61,7 @@ function onFocus(context, handler) {
remove = () => document.removeEventListener('focus', handler, true);
}

currentFocusListener = { remove }
currentFocusListener = { remove };

return currentFocusListener;
}
Expand Down Expand Up @@ -298,7 +299,7 @@ const Modal = React.createClass({
try {
this.lastFocus = document.activeElement;
}
catch (e) {}
catch (e) {} // eslint-disable-line no-empty
}
},

Expand Down
4 changes: 2 additions & 2 deletions test/ModalSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ describe('Modal', function () {
}
});

var instance = React.render(<Container />, focusableContainer);
let instance = React.render(<Container />, focusableContainer);

setTimeout(function () {
let input = React.findDOMNode(
ReactTestUtils.findRenderedDOMComponentWithTag(instance, 'input'))
ReactTestUtils.findRenderedDOMComponentWithTag(instance, 'input'));

document.activeElement.should.equal(input);
done();
Expand Down

0 comments on commit 3131bc3

Please sign in to comment.