diff --git a/app/assets/javascripts/discourse/ember/resolver.js b/app/assets/javascripts/discourse/ember/resolver.js index 5e7eec5831c..4f9a25d6e6f 100644 --- a/app/assets/javascripts/discourse/ember/resolver.js +++ b/app/assets/javascripts/discourse/ember/resolver.js @@ -37,11 +37,16 @@ Discourse.Resolver = Ember.DefaultResolver.extend({ normalize: function(fullName) { var split = fullName.split(':'); if (split.length > 1) { + + // Try slashes var dashed = Ember.String.dasherize(split[1].replace(/\./g, '/')), moduleName = 'discourse/' + split[0] + 's/' + dashed; - if (requirejs.entries[moduleName]) { - return split[0] + ":" + dashed; - } + if (requirejs.entries[moduleName]) { return split[0] + ":" + dashed; } + + // Try with dashes instead of slashes + dashed = Ember.String.dasherize(split[1].replace(/\./g, '-')); + moduleName = 'discourse/' + split[0] + 's/' + dashed; + if (requirejs.entries[moduleName]) { return split[0] + ":" + dashed; } } return this._super(fullName); },