From a710ff08ad26923e27cb2ef8ac3e075c7fea55e3 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 13 Nov 2014 17:16:16 -0500 Subject: [PATCH] Missing Loading Route --- app/assets/javascripts/discourse/ember/resolver.js.es6 | 5 +++-- app/assets/javascripts/discourse/routes/loading.js.es6 | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 app/assets/javascripts/discourse/routes/loading.js.es6 diff --git a/app/assets/javascripts/discourse/ember/resolver.js.es6 b/app/assets/javascripts/discourse/ember/resolver.js.es6 index 6fa05c6ecbb..327af802caf 100644 --- a/app/assets/javascripts/discourse/ember/resolver.js.es6 +++ b/app/assets/javascripts/discourse/ember/resolver.js.es6 @@ -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); diff --git a/app/assets/javascripts/discourse/routes/loading.js.es6 b/app/assets/javascripts/discourse/routes/loading.js.es6 new file mode 100644 index 00000000000..9d032c9e3ba --- /dev/null +++ b/app/assets/javascripts/discourse/routes/loading.js.es6 @@ -0,0 +1 @@ +export default Ember.Route.extend();