Skip to content

Commit 515643c

Browse files
committed
render hook fix
1 parent 269016e commit 515643c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/LiveComponent/assets/dist/live_controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2030,6 +2030,7 @@ var Component = class {
20302030
new URL(liveUrl + window.location.hash, window.location.origin)
20312031
);
20322032
}
2033+
this.hooks.triggerHook("render:finished", this);
20332034
this.backendRequest = null;
20342035
thisPromiseResolve(backendResponse);
20352036
if (this.isRequestPending) {
@@ -2106,7 +2107,6 @@ var Component = class {
21062107
})
21072108
);
21082109
});
2109-
this.hooks.triggerHook("render:finished", this);
21102110
}
21112111
calculateDebounce(debounce) {
21122112
if (debounce === true) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,8 @@ export default class Component {
337337
);
338338
}
339339

340+
this.hooks.triggerHook('render:finished', this);
341+
340342
// finally resolve this promise
341343
this.backendRequest = null;
342344
thisPromiseResolve(backendResponse);
@@ -446,8 +448,6 @@ export default class Component {
446448
})
447449
);
448450
});
449-
450-
this.hooks.triggerHook('render:finished', this);
451451
}
452452

453453
private calculateDebounce(debounce: number | boolean): number {

0 commit comments

Comments
 (0)