From 352bd35bf6022b5728e0f60d62225cbbb6a1aba5 Mon Sep 17 00:00:00 2001 From: Jan Cernik <66427541+jancernik@users.noreply.github.com> Date: Tue, 11 Apr 2023 06:22:42 -0300 Subject: [PATCH] Add RenderGlimmer support for embedded posts (#21046) --- .../javascripts/discourse/app/widgets/embedded-post.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/assets/javascripts/discourse/app/widgets/embedded-post.js b/app/assets/javascripts/discourse/app/widgets/embedded-post.js index 197250663bf..6f7f1242082 100644 --- a/app/assets/javascripts/discourse/app/widgets/embedded-post.js +++ b/app/assets/javascripts/discourse/app/widgets/embedded-post.js @@ -54,4 +54,12 @@ export default createWidget("embedded-post", { ]), ]; }, + + init() { + this.postContentsDestroyCallbacks = []; + }, + + destroy() { + this.postContentsDestroyCallbacks.forEach((c) => c()); + }, });