diff --git a/public/js/controllers/userCtrl.js b/public/js/controllers/userCtrl.js index 443a7f934d..351f57688f 100644 --- a/public/js/controllers/userCtrl.js +++ b/public/js/controllers/userCtrl.js @@ -16,7 +16,6 @@ habitrpg.controller("UserCtrl", ['$rootScope', '$scope', '$location', 'User', '$ } $scope.changeClass = function(klass){ - if (!$scope.selectedClass) return; if (!klass) { if (!confirm("Are you sure you want to re-roll? This will reset your character's class and allocated points (you'll get them all back to re-allocate)")) return; diff --git a/src/controllers/user.js b/src/controllers/user.js index c7be285db7..3c2a282005 100644 --- a/src/controllers/user.js +++ b/src/controllers/user.js @@ -225,7 +225,7 @@ api.update = function(req, res, next) { api.cron = function(req, res, next) { var user = res.locals.user; - shared.cron(user); + user.fns.cron(); if (user.isModified()) res.locals.wasModified = true; user.save(next); diff --git a/views/shared/modals/classes.jade b/views/shared/modals/classes.jade index 52f1788fb8..7e9c740800 100644 --- a/views/shared/modals/classes.jade +++ b/views/shared/modals/classes.jade @@ -67,4 +67,4 @@ .well(ng-show='selectedClass=="healer"') Healers have high defense against damage, and can heal themselves and other players in the party, as well as buff players. .modal-footer - button.btn.btn-default.cancel(ng-click='changeClass(selectedClass)') Select \ No newline at end of file + button.btn.btn-default.cancel(ng-click='selectedClass && changeClass(selectedClass)') Select \ No newline at end of file