A platform for community discussion. Free, open, simple.
FIX: Support PluginOutlet invocations with deprecated tagName (#23913)
David Taylor6e004b04e183
diff --git a/app/assets/javascripts/discourse/app/components/plugin-outlet.js b/app/assets/javascripts/discourse/app/components/plugin-outlet.jsindex 7135f27c7a2..05f2a6d8295 100644--- a/app/assets/javascripts/discourse/app/components/plugin-outlet.js+++ b/app/assets/javascripts/discourse/app/components/plugin-outlet.js@@ -83,7 +83,7 @@ export default class PluginOutletComponent extends GlimmerComponentWithDeprecate}@bind- getConnectors({ hasBlock }) {+ getConnectors({ hasBlock } = {}) {const connectors = renderedConnectorsFor(this.args.name,this.outletArgsWithDeprecations,diff --git a/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-test.gjsindex f27599695ca..72f143b2b66 100644--- a/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-test.gjs+++ b/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-test.gjs@@ -460,3 +460,16 @@ module(});});++module("Integration | Component | plugin-outlet | tagName", function (hooks) {+ setupRenderingTest(hooks);++ test("supports the `@tagName` argument", async function (assert) {+ await withSilencedDeprecationsAsync(+ "discourse.plugin-outlet-tag-name",+ async () =>+ await render(hbs`<PluginOutlet @name="test-name" @tagName="div" />`)+ );+ assert.dom("div").exists();+ });+});