File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
assets/js/phoenix_live_view Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1163,14 +1163,17 @@ export default class View {
11631163 `failed mount with ${ resp . status } . Falling back to page reload` ,
11641164 resp ,
11651165 ] ) ;
1166- this . onRedirect ( { to : this . root . href , reloadToken : resp . token } ) ;
1166+ this . onRedirect ( {
1167+ to : this . liveSocket . main . href ,
1168+ reloadToken : resp . token ,
1169+ } ) ;
11671170 return ;
11681171 } else if ( resp . reason === "unauthorized" || resp . reason === "stale" ) {
11691172 this . log ( "error" , ( ) => [
11701173 "unauthorized live_redirect. Falling back to page request" ,
11711174 resp ,
11721175 ] ) ;
1173- this . onRedirect ( { to : this . root . href , flash : this . flash } ) ;
1176+ this . onRedirect ( { to : this . liveSocket . main . href , flash : this . flash } ) ;
11741177 return ;
11751178 }
11761179 if ( resp . redirect || resp . live_redirect ) {
You can’t perform that action at this time.
0 commit comments