Skip to content

Commit

Permalink
check location is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
adanmayer committed May 2, 2022
1 parent b8ba668 commit 59e87bc
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -591,12 +591,16 @@ public TurbolinksSession restoreWithCachedSnapshot(boolean restoreWithCachedSnap
public void visitProposedToLocationWithAction(final String location, final String action) {
TurbolinksLog.d("visitProposedToLocationWithAction called");

TurbolinksHelper.runOnMainThread(activity, new Runnable() {
@Override
public void run() {
turbolinksAdapter.visitProposedToLocationWithAction(location, action);
}
});
if (location != null) {
TurbolinksHelper.runOnMainThread(activity, new Runnable() {
@Override
public void run() {
turbolinksAdapter.visitProposedToLocationWithAction(location, action != null ? action : ACTION_ADVANCE);
}
});
} else {
TurbolinksLog.e("visitProposedToLocationWithAction called with NULL location!");
}
}

/**
Expand Down

0 comments on commit 59e87bc

Please sign in to comment.