diff --git a/src/index.js b/src/index.js index 3a324274..109e9ffb 100644 --- a/src/index.js +++ b/src/index.js @@ -393,6 +393,11 @@ export default class extends Component { * @param {string} dir 'x' || 'y' */ updateIndex = (offset, dir, cb) => { + + if(offset === undefined || this.internals.offset === undefined){ + return; + } + const state = this.state let index = state.index const diff = offset[dir] - this.internals.offset[dir]