summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/dispatcher.js3
-rw-r--r--app/assets/javascripts/users/index.js4
2 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js
index f8082c74943..e3d30442339 100644
--- a/app/assets/javascripts/dispatcher.js
+++ b/app/assets/javascripts/dispatcher.js
@@ -466,6 +466,9 @@ var Dispatcher;
import('./pages/users/show')
.then(callDefault)
.catch(fail);
+ import('./users')
+ .then(callDefault)
+ .catch(fail);
break;
case 'admin:conversational_development_index:show':
import('./pages/admin/conversational_development_index/show')
diff --git a/app/assets/javascripts/users/index.js b/app/assets/javascripts/users/index.js
index 9fd8452a2b6..687f4de377c 100644
--- a/app/assets/javascripts/users/index.js
+++ b/app/assets/javascripts/users/index.js
@@ -18,8 +18,8 @@ function initUserProfile(action) {
});
}
-document.addEventListener('DOMContentLoaded', () => {
+export default () => {
const page = $('body').attr('data-page');
const action = page.split(':')[1];
initUserProfile(action);
-});
+};