FIX: Support PluginOutlet invocations with deprecated tagName (#23913)

This regressed in af305366
This commit is contained in:
David Taylor 2023-10-12 11:03:44 +01:00 committed by GitHub
parent 88951e03bf
commit 6e004b04e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -83,7 +83,7 @@ export default class PluginOutletComponent extends GlimmerComponentWithDeprecate
}
@bind
getConnectors({ hasBlock }) {
getConnectors({ hasBlock } = {}) {
const connectors = renderedConnectorsFor(
this.args.name,
this.outletArgsWithDeprecations,

View File

@ -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();
});
});