Skip to content

Commit

Permalink
Scope and settings not in sync techx#15
Browse files Browse the repository at this point in the history
Fix bug where scope.allowMinors was mixed
scope.settings.allowMinors.
  • Loading branch information
jeremy-melnyk committed Oct 28, 2017
1 parent 62e90b5 commit 5f85bcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/client/views/admin/settings/adminSettingsCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ angular.module('reg')
// Additional Options --------------------------------------

$scope.updateAllowMinors = function () {
$scope.allowMinors = !$scope.allowMinors;
$scope.settings.allowMinors = !$scope.settings.allowMinors;

SettingsService
.updateAllowMinors($scope.allowMinors)
.updateAllowMinors($scope.settings.allowMinors)
.success(function (data) {
$scope.settings.allowMinors = data.allowMinors;
const successText = $scope.settings.allowMinors ?
Expand Down

0 comments on commit 5f85bcd

Please sign in to comment.