diff --git a/htmx-spring-boot/src/main/java/io/github/wimdeblauwe/htmx/spring/boot/mvc/HtmxHandlerInterceptor.java b/htmx-spring-boot/src/main/java/io/github/wimdeblauwe/htmx/spring/boot/mvc/HtmxHandlerInterceptor.java index 18f420b..604eeb4 100644 --- a/htmx-spring-boot/src/main/java/io/github/wimdeblauwe/htmx/spring/boot/mvc/HtmxHandlerInterceptor.java +++ b/htmx-spring-boot/src/main/java/io/github/wimdeblauwe/htmx/spring/boot/mvc/HtmxHandlerInterceptor.java @@ -37,10 +37,7 @@ public void postHandle(HttpServletRequest request, HttpServletResponse response, } private void buildAndRender(HtmxResponse htmxResponse, ModelAndView mav, HttpServletRequest request, HttpServletResponse response) { - View v = htmxResponseHandlerMethodReturnValueHandler.toView(htmxResponse); try { - Map model = mav != null ? mav.getModel() : Map.of(); - v.render(model, request, response); // ModelAndViewContainer is not available here, so flash attributes won't work htmxResponseHandlerMethodReturnValueHandler.addHxHeaders(htmxResponse, request, response, null); } catch (Exception e) {