diff --git a/index.js b/index.js index 3cbb1c8..8d62d8f 100644 --- a/index.js +++ b/index.js @@ -39,7 +39,7 @@ export default class Toast extends Component { show(text, duration, callback, onPress) { this.duration = typeof duration === 'number' ? duration : DURATION.LENGTH_SHORT; this.callback = callback; - console.log(typeof onPress) + if(typeof onPress === 'function') this.onPress = onPress this.setState({