Skip to content

Commit

Permalink
Update method declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
jossmac authored Nov 18, 2016
1 parent 9b661c4 commit be609e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ScrollLock.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var React = require('react');
*/

var ScrollLock = React.createClass({
componentWillMount () {
componentWillMount: function () {
if (!canUseDom) return;

const scrollbarWidth = window.innerWidth - document.body.clientWidth; // 1.
Expand All @@ -19,7 +19,7 @@ var ScrollLock = React.createClass({
target.style.paddingRight = scrollbarWidth + 'px';
target.style.overflowY = 'hidden';
},
componentWillUnmount () {
componentWillUnmount: function () {
if (!canUseDom) return;

const target = document.body;
Expand All @@ -29,7 +29,7 @@ var ScrollLock = React.createClass({
target.style.paddingRight = '';
target.style.overflowY = '';
},
render () {
render: function () {
return null;
}
});
Expand Down

0 comments on commit be609e3

Please sign in to comment.