fixed toggling admin user option.

This commit is contained in:
kunw 2016-07-27 23:18:24 +08:00
parent 405f013e7a
commit b68e12b52a

View File

@ -25,7 +25,7 @@
function ToggleAdminController($scope, ToggleAdminService, $filter, trFilter) {
var vm = this;
vm.isAdmin = (vm.hasAdminRole === 1) ? true : false;
vm.isAdmin = (Number(vm.hasAdminRole) === 1) ? true : false;
vm.enabled = vm.isAdmin ? 0 : 1;
vm.toggle = toggle;