Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tutorials/instagram-style-double-tap/src/DoubleTap.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class DoubleTap extends React.Component {
// https://gist.github.com/brunotavares/3c9a373ba5cd1b4ff28b
handleDoubleTap = () => {
const now = Date.now();
if (this.lastTap && (now - this.lastTap) < this.props.delay) {
if (lastTap && now - lastTap < (this.props.delay || defaultProps.delay)) {
this.props.onDoubleTap();
} else {
this.lastTap = now;
Expand Down