Missing Loading Route

This commit is contained in:
Robin Ward 2014-11-13 17:16:16 -05:00
parent bf666f8553
commit a710ff08ad
2 changed files with 4 additions and 2 deletions

View File

@ -3,7 +3,7 @@
var classify = Ember.String.classify;
var get = Ember.get;
var LOADING_WHITELIST = ['badges', 'userActivity', 'userPrivateMessages', 'admin', 'adminFlags',
var LOADING_WHITELIST = ['badges', 'userActivity', 'userPrivateMessages', 'admin', 'adminFlags',
'user', 'preferences', 'adminEmail'],
_dummyRoute,
_loadingView;
@ -11,7 +11,8 @@ var LOADING_WHITELIST = ['badges', 'userActivity', 'userPrivateMessages', 'admin
function loadingResolver(cb) {
return function(parsedName) {
var fullNameWithoutType = parsedName.fullNameWithoutType;
if (fullNameWithoutType.indexOf('Loading') > 0) {
if (fullNameWithoutType.indexOf('Loading') >= 0) {
fullNameWithoutType = fullNameWithoutType.replace('Loading', '');
if (LOADING_WHITELIST.indexOf(fullNameWithoutType) !== -1) {
return cb(fullNameWithoutType);

View File

@ -0,0 +1 @@
export default Ember.Route.extend();