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 @@ -1080,14 +1080,17 @@ export default class View {
10801080 `failed mount with ${ resp . status } . Falling back to page reload` ,
10811081 resp ,
10821082 ] ) ;
1083- this . onRedirect ( { to : this . root . href , reloadToken : resp . token } ) ;
1083+ this . onRedirect ( {
1084+ to : this . liveSocket . main . href ,
1085+ reloadToken : resp . token ,
1086+ } ) ;
10841087 return ;
10851088 } else if ( resp . reason === "unauthorized" || resp . reason === "stale" ) {
10861089 this . log ( "error" , ( ) => [
10871090 "unauthorized live_redirect. Falling back to page request" ,
10881091 resp ,
10891092 ] ) ;
1090- this . onRedirect ( { to : this . root . href , flash : this . flash } ) ;
1093+ this . onRedirect ( { to : this . liveSocket . main . href , flash : this . flash } ) ;
10911094 return ;
10921095 }
10931096 if ( resp . redirect || resp . live_redirect ) {
You can’t perform that action at this time.
0 commit comments