FIX: Allow plugins to override admin component templates

This commit is contained in:
Robin Ward
2018-01-10 13:14:16 -05:00
parent 01726e68ab
commit 17213887a1
2 changed files with 3 additions and 2 deletions

View File

@ -195,7 +195,8 @@ export function buildResolver(baseName) {
findAdminTemplate(parsedName) {
var decamelized = parsedName.fullNameWithoutType.decamelize();
if (decamelized.indexOf('components') === 0) {
const compTemplate = Ember.TEMPLATES['admin/templates/' + decamelized];
let comPath = `admin/templates/${decamelized}`;
const compTemplate = Ember.TEMPLATES[`javascripts/${comPath}`] || Ember.TEMPLATES[comPath];
if (compTemplate) { return compTemplate; }
}