diff --git a/app/assets/javascripts/discourse/app/helpers/raw.js b/app/assets/javascripts/discourse/app/helpers/raw.js index 62ec07c3f19..bddd2f6a810 100644 --- a/app/assets/javascripts/discourse/app/helpers/raw.js +++ b/app/assets/javascripts/discourse/app/helpers/raw.js @@ -2,6 +2,7 @@ import { helperContext, registerUnbound } from "discourse-common/lib/helpers"; import { findRawTemplate } from "discourse-common/lib/raw-templates"; import { htmlSafe } from "@ember/template"; import { RUNTIME_OPTIONS } from "discourse-common/lib/raw-handlebars-helpers"; +import { getOwner, setOwner } from "@ember/application"; function renderRaw(ctx, template, templateName, params) { params = Object.assign({}, params); @@ -13,6 +14,7 @@ function renderRaw(ctx, template, templateName, params) { if (viewClass) { params.view = viewClass.create(params, context); + setOwner(params.view, getOwner(context.site)); } if (!params.view) {