Fix resolver for mobile templates
This commit is contained in:
parent
99b6a62fcb
commit
c04613f269
|
@ -16,7 +16,7 @@ Discourse.Resolver = Ember.DefaultResolver.extend({
|
||||||
@returns {Template} the template (if found)
|
@returns {Template} the template (if found)
|
||||||
**/
|
**/
|
||||||
resolveTemplate: function(parsedName) {
|
resolveTemplate: function(parsedName) {
|
||||||
if (Discourse.Session.currentProp('mobileView')) {
|
if (Discourse.Mobile.mobileView) {
|
||||||
var mobileParsedName = this.parseName(parsedName.fullName.replace("template:", "template:mobile/"));
|
var mobileParsedName = this.parseName(parsedName.fullName.replace("template:", "template:mobile/"));
|
||||||
var mobileTemplate = this.findTemplate(mobileParsedName);
|
var mobileTemplate = this.findTemplate(mobileParsedName);
|
||||||
if (mobileTemplate) return mobileTemplate;
|
if (mobileTemplate) return mobileTemplate;
|
||||||
|
|
Loading…
Reference in New Issue