Skip to content

Commit fa2b190

Browse files
author
scottjehl
committed
only add a back button when there's a history entry to return to.
1 parent 700ca98 commit fa2b190

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/jquery.mobile.page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ $.widget( "mobile.page", $.mobile.widget, {
7575

7676
// auto-add back btn on pages beyond first view
7777
if ( o.addBackBtn && role === "header" &&
78-
($.mobile.urlHistory.getPrev() || $(".ui-page").length > 1) &&
78+
$.mobile.urlHistory.stack.length > 0 &&
7979
!leftbtn && $this.data( "backbtn" ) !== false ) {
8080

8181
$( "<a href='#' class='ui-btn-left' data-icon='arrow-l'>"+ o.backBtnText +"</a>" )

0 commit comments

Comments
 (0)