Skip to content

Commit

Permalink
fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksptang committed Nov 24, 2023
1 parent 976b46e commit 4a31c29
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ var PassageMenuView = Backbone.View.extend({

// If the device is mobile, and the user has swiped at least 3x (so they know
// how it works), then don't display the prev/next arrows anymore.
var swipeStatus = step.passages.findWhere({ passageId: step.util.activePassageId()}).get("isSwipeLeftRight");
// Calling activePassageId can crash so just use passageID 0
var swipeStatus = step.passages.findWhere({ passageId: 0}).get("isSwipeLeftRight");
if (swipeStatus == undefined)
swipeStatus = true;
if (step.touchDevice && swipeCount >= 3 && swipeStatus)
Expand Down

0 comments on commit 4a31c29

Please sign in to comment.