Skip to content

Commit ba7dfcb

Browse files
vaadin-botArtur-
andauthored
fix: Do not throw if re-setting the login view (#19996) (#20002)
Fixes #19910 Co-authored-by: Artur <artur@vaadin.com>
1 parent e7ac185 commit ba7dfcb

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎flow-server/src/main/java/com/vaadin/flow/server/auth/NavigationAccessControl.java‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ public final boolean isEnabled() {
187187
* the Flow view to use as login view
188188
*/
189189
public final void setLoginView(Class<? extends Component> loginView) {
190+
if (loginView == this.loginView) {
191+
// Probably hot reload
192+
return;
193+
}
190194
throwIfLoginViewSet();
191195
this.loginView = loginView;
192196
}
@@ -210,6 +214,11 @@ protected Class<? extends Component> getLoginView() {
210214
* the frontend view to use as login view
211215
*/
212216
public void setLoginView(String loginUrl) {
217+
if (loginUrl == this.loginUrl) {
218+
// Probably hot reload
219+
return;
220+
}
221+
213222
throwIfLoginViewSet();
214223
this.loginUrl = loginUrl;
215224
}

0 commit comments

Comments
 (0)