Skip to content
This repository was archived by the owner on Aug 3, 2022. It is now read-only.

Commit da77bf9

Browse files
author
Aditya Rahmanto
committed
change value offset default from null to 0, this will prevent error NaN marginLeft
1 parent ce3f932 commit da77bf9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dist/js/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ var Switch = function (_React$Component) {
2828
function Switch(props) {
2929
_classCallCheck(this, Switch);
3030

31-
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Switch).call(this, props));
31+
var _this = _possibleConstructorReturn(this, (Switch.__proto__ || Object.getPrototypeOf(Switch)).call(this, props));
3232

3333
_this.state = {
34-
offset: null,
34+
offset: 0,
3535
skipAnimation: true,
3636
dragStart: false,
3737
focus: false,

src/js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default class Switch extends React.Component {
77
super(props);
88

99
this.state = {
10-
offset: null,
10+
offset: 0,
1111
skipAnimation: true,
1212
dragStart: false,
1313
focus: false,

0 commit comments

Comments
 (0)