Skip to content

Commit

Permalink
Fixed navigateFunction bug in navigateWheel
Browse files Browse the repository at this point in the history
  • Loading branch information
softwaretailoring committed Apr 11, 2017
1 parent 322f321 commit 170c689
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion js/dist/core/wheelnav.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,8 @@ wheelnav.prototype.navigateWheel = function (clicked) {
this.spreader.setCurrentTransform(true);
}

if (this.navItems[clicked].navigateFunction !== null) {
if (clicked !== null &&
this.navItems[clicked].navigateFunction !== null) {
this.navItems[clicked].navigateFunction();
}
};
Expand Down
2 changes: 1 addition & 1 deletion js/dist/core/wheelnav.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dist/core/wheelnav.min.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion js/dist/wheelnav.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,8 @@ wheelnav.prototype.navigateWheel = function (clicked) {
this.spreader.setCurrentTransform(true);
}

if (this.navItems[clicked].navigateFunction !== null) {
if (clicked !== null &&
this.navItems[clicked].navigateFunction !== null) {
this.navItems[clicked].navigateFunction();
}
};
Expand Down
2 changes: 1 addition & 1 deletion js/dist/wheelnav.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dist/wheelnav.min.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion js/source/wheelnav.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ wheelnav.prototype.navigateWheel = function (clicked) {
this.spreader.setCurrentTransform(true);
}

if (this.navItems[clicked].navigateFunction !== null) {
if (clicked !== null &&
this.navItems[clicked].navigateFunction !== null) {
this.navItems[clicked].navigateFunction();
}
};
Expand Down

0 comments on commit 170c689

Please sign in to comment.