Skip to content

Commit

Permalink
don't refresh is navigation has not yet happened
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollovati committed Jun 18, 2024
1 parent 30c624e commit ca50465
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ private UIRefreshStrategy computeRefreshStrategy(UI ui,
Set<Class<?>> changedClasses) {
List<HasElement> targetsChain = new ArrayList<>(
ui.getActiveRouterTargetsChain());
if (targetsChain.isEmpty()) {
// Navigation to a view has not yet happened
return UIRefreshStrategy.SKIP;
}
HasElement route = targetsChain.get(0);
boolean pushEnabled = ui.getPushConfiguration().getPushMode()
.isEnabled();
Expand Down

0 comments on commit ca50465

Please sign in to comment.