mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Allow reviewable-item components to be template-only (#19257)
The akismet plugin defines the `reviewable-akismet-post` component using a template under `discourse/templates/components/reviewable-akismet-post.hbs` without an associated `.js` file. The change to our resolution logic in c1397670 wasn't considering this.
This commit is contained in:
@@ -107,9 +107,10 @@ export default Component.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const dasherized = dasherize(type);
|
const dasherized = dasherize(type);
|
||||||
const componentExists = getOwner(this).hasRegistration(
|
const owner = getOwner(this);
|
||||||
`component:${dasherized}`
|
const componentExists =
|
||||||
);
|
owner.hasRegistration(`component:${dasherized}`) ||
|
||||||
|
owner.hasRegistration(`template:components/${dasherized}`);
|
||||||
_components[type] = componentExists ? dasherized : null;
|
_components[type] = componentExists ? dasherized : null;
|
||||||
return _components[type];
|
return _components[type];
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user