We've been having an issue in which an immediate redirect from a page with a ReactIScroll component causes a crash. _teardownIScroll() ends up getting called before the function in setTimeout(), so this._iScrollInstance is undefined when destroy() is called. So, this pull request just gives the option to defer or not, depending on whether this.props.defer is specified.
We've been having an issue in which an immediate redirect from a page with a
ReactIScroll
component causes a crash._teardownIScroll()
ends up getting called before the function insetTimeout()
, sothis._iScrollInstance
is undefined whendestroy()
is called. So, this pull request just gives the option to defer or not, depending on whetherthis.props.defer
is specified.Love the library!