diff --git a/app/assets/javascripts/discourse/routes/preferences.js.es6 b/app/assets/javascripts/discourse/routes/preferences.js.es6 index 8bea9b46047..fd9bba95d20 100644 --- a/app/assets/javascripts/discourse/routes/preferences.js.es6 +++ b/app/assets/javascripts/discourse/routes/preferences.js.es6 @@ -49,9 +49,9 @@ export default RestrictedUserRoute.extend({ const user = this.modelFor('user'), controller = this.controllerFor('avatar-selector'), selectedUploadId = controller.get("selectedUploadId"), - selectedAvatarTemplate = controller.get("selectedAvatarTemplate"), - type = controller.get("selected"); + selectedAvatarTemplate = controller.get("selectedAvatarTemplate"); + let type = controller.get("selected"); if (type === "uploaded") { type = "custom" } user.pickAvatar(selectedUploadId, type, selectedAvatarTemplate)