diff --git a/packages/@ember/-internals/glimmer/lib/resolver.ts b/packages/@ember/-internals/glimmer/lib/resolver.ts index 172255eb017..43f49e93575 100644 --- a/packages/@ember/-internals/glimmer/lib/resolver.ts +++ b/packages/@ember/-internals/glimmer/lib/resolver.ts @@ -123,9 +123,6 @@ export default class RuntimeResolver implements IRuntimeResolver { - assert('You cannot use `textarea` as a component name.', name !== 'textarea'); - assert('You cannot use `input` as a component name.', name !== 'input'); - let handle = this.lookupComponentHandle(name, meta); if (handle === null) { assert( @@ -306,6 +303,9 @@ export default class RuntimeResolver implements IRuntimeResolver { + assert('You cannot use `textarea` as a component name.', _name !== 'textarea'); + assert('You cannot use `input` as a component name.', _name !== 'input'); + let name = _name; let namespace = undefined; if (EMBER_MODULE_UNIFICATION) { diff --git a/packages/@ember/-internals/glimmer/tests/integration/helpers/input-test.js b/packages/@ember/-internals/glimmer/tests/integration/helpers/input-test.js index de377b48806..547f662ac42 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/helpers/input-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/helpers/input-test.js @@ -80,6 +80,12 @@ class InputRenderingTest extends RenderingTestCase { moduleFor( 'Helpers test: {{input}}', class extends InputRenderingTest { + ['@test should not allow angle bracket invocation']() { + expectAssertion(() => { + this.render(''); + }, 'You cannot use `input` as a component name.'); + } + ['@test a single text field is inserted into the DOM']() { this.render(`{{input type="text" value=value}}`, { value: 'hello' }); diff --git a/packages/@ember/-internals/glimmer/tests/integration/helpers/text-area-test.js b/packages/@ember/-internals/glimmer/tests/integration/helpers/text-area-test.js index 1dd27a91de2..27a984ddecc 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/helpers/text-area-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/helpers/text-area-test.js @@ -66,6 +66,12 @@ applyMixins( moduleFor( 'Helpers test: {{textarea}}', class extends TextAreaRenderingTest { + ['@test Should not allow angle bracket invocation']() { + expectAssertion(() => { + this.render('