Skip to content

Commit 1b0418f

Browse files
xDeSwaKocal
authored andcommitted
[LiveComponent] Replace the browser's URL before triggering render:finished hook
1 parent 269016e commit 1b0418f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/LiveComponent/assets/dist/live_controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2021,7 +2021,6 @@ var Component = class {
20212021
thisPromiseResolve(backendResponse);
20222022
return response;
20232023
}
2024-
this.processRerender(html, backendResponse);
20252024
const liveUrl = backendResponse.getLiveUrl();
20262025
if (liveUrl) {
20272026
history.replaceState(
@@ -2030,6 +2029,7 @@ var Component = class {
20302029
new URL(liveUrl + window.location.hash, window.location.origin)
20312030
);
20322031
}
2032+
this.processRerender(html, backendResponse);
20332033
this.backendRequest = null;
20342034
thisPromiseResolve(backendResponse);
20352035
if (this.isRequestPending) {

src/LiveComponent/assets/src/Component/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ export default class Component {
327327
return response;
328328
}
329329

330-
this.processRerender(html, backendResponse);
331330
const liveUrl = backendResponse.getLiveUrl();
332331
if (liveUrl) {
333332
history.replaceState(
@@ -337,6 +336,8 @@ export default class Component {
337336
);
338337
}
339338

339+
this.processRerender(html, backendResponse);
340+
340341
// finally resolve this promise
341342
this.backendRequest = null;
342343
thisPromiseResolve(backendResponse);

0 commit comments

Comments
 (0)