FIX: Support raw templates in the latest discourse releases
This commit is contained in:
parent
e2ee693f64
commit
4b3e5d547d
|
@ -80,7 +80,13 @@ const QueryResultComponent = Ember.Component.extend({
|
|||
if (self.get('content.colrender')[idx]) {
|
||||
viewName = self.get('content.colrender')[idx];
|
||||
}
|
||||
const template = getOwner(self).lookup('template:explorer/' + viewName + '.raw');
|
||||
|
||||
// After `findRawTemplates` is in stable this should be updated to use that
|
||||
let template = getOwner(self).lookup('template:explorer/' + viewName + '.raw');
|
||||
if (!template) {
|
||||
template = Discourse.RAW_TEMPLATES[`javascripts/explorer/${viewName}`];
|
||||
}
|
||||
|
||||
return {name: viewName, template };
|
||||
});
|
||||
}.property('content', 'columns.@each'),
|
||||
|
|
|
@ -68,7 +68,6 @@ const QueryRowContentComponent = Ember.Component.extend(bufferedRender({
|
|||
return new Handlebars.SafeString((t.template || fallback)(ctx, params));
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
debugger;
|
||||
return "error";
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue