Browse Source

fix: page crash when navigating to home if default home is a custom page #5060

charlie 3 years ago
parent
commit
3973f2794e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/main/frontend/handler/route.cljs

+ 3 - 1
src/main/frontend/handler/route.cljs

@@ -17,7 +17,9 @@
     :or {push true}}]
   (let [route-fn (if push rfe/push-state rfe/replace-state)]
     (state/save-scroll-position! (util/scroll-top))
-    (route-fn to path-params query-params)))
+    (route-fn to path-params query-params))
+  ;; force return nil for usage in render phase of React
+  nil)
 
 (defn redirect-to-home!
   ([]