Skip to content

Commit

Permalink
DEV: Pass post instead of transformedPost to post-bottom-ad (#199)
Browse files Browse the repository at this point in the history
Changes in 0948d6b caused the post-bottom-ad component to start receiving the widget-ised 'transformedPost' instead of the original `post` model. In most cases this difference didn't matter, but it did cause noticable issues with `@model.category` and `@model.topic`.

This commit also deletes the unused `post-bottom/discourse-adplugin.hbs` connector. In the past, the adplugin itself was defining the post-bottom outlet. But now, we use RenderGlimmer to load the `post-bottom-ad` directly.
  • Loading branch information
davidtaylorhq authored Feb 14, 2024
1 parent 751916b commit 1677f7a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default {

withPluginApi("0.1", (api) => {
api.decorateWidget("post:after", (helper) => {
return helper.attach("after-post-ad", helper.attrs);
return helper.attach("after-post-ad", helper.widget.model);
});
});

Expand Down

0 comments on commit 1677f7a

Please sign in to comment.