Skip to content

Commit 3e865f0

Browse files
vaadin-botArtur-
andauthored
fix: Render only one error page when trying to go to a view without access (#12473) (#12479)
Before this, an additional error page was rendered below the current error page if an error occured when navigating from the error page (which happens if you click on a view you do not have access to) Co-authored-by: Artur <artur@vaadin.com>
1 parent 3f3b786 commit 3e865f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎flow-server/src/main/java/com/vaadin/flow/router/RouteNotFoundError.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public int setErrorParameter(BeforeEnterEvent event,
7777
template = template.replace("{{additionalInfo}}", additionalInfo);
7878
template = template.replace("{{path}}", path);
7979

80-
getElement().appendChild(new Html(template).getElement());
80+
getElement().setChild(0, new Html(template).getElement());
8181
return HttpServletResponse.SC_NOT_FOUND;
8282
}
8383

0 commit comments

Comments
 (0)