Skip to content

Commit

Permalink
fix NaN on mount (leecade#1193)
Browse files Browse the repository at this point in the history
  • Loading branch information
mschipperheyn authored Jun 22, 2020
1 parent 28d034a commit bdf2539
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ export default class extends Component {
if (!this.internals.offset)
// Android not setting this onLayout first? https://github.com/leecade/react-native-swiper/issues/582
this.internals.offset = {}
const diff = offset[dir] - this.internals.offset[dir]
const diff = offset[dir] - (this.internals.offset[dir] || 0)
const step = dir === 'x' ? state.width : state.height
let loopJump = false

Expand Down

0 comments on commit bdf2539

Please sign in to comment.