Resolve raw templates in 'javascripts/mobile' and 'javascripts' on mobile

This commit is contained in:
Angus McLeod 2016-12-22 18:13:04 -05:00
parent 46f2a11a80
commit 6f0a937fa1
1 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,9 @@ import { getResolverOption } from 'discourse-common/resolver';
export function findRawTemplate(name) {
if (getResolverOption('mobileView')) {
return Discourse.RAW_TEMPLATES[`mobile/${name}`] ||
return Discourse.RAW_TEMPLATES[`javascripts/mobile/${name}`] ||
Discourse.RAW_TEMPLATES[`javascripts/${name}`] ||
Discourse.RAW_TEMPLATES[`mobile/${name}`] ||
Discourse.RAW_TEMPLATES[name];
}