From c4d742a8749db655a52b510fc2a0c2b923b61f06 Mon Sep 17 00:00:00 2001 From: kunw Date: Wed, 27 Jul 2016 23:52:19 +0800 Subject: [PATCH] refine comparsion expression --- static/resources/js/components/user/toggle-admin.directive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/resources/js/components/user/toggle-admin.directive.js b/static/resources/js/components/user/toggle-admin.directive.js index ec768cd89..01b2d850e 100644 --- a/static/resources/js/components/user/toggle-admin.directive.js +++ b/static/resources/js/components/user/toggle-admin.directive.js @@ -25,7 +25,7 @@ function ToggleAdminController($scope, ToggleAdminService, $filter, trFilter) { var vm = this; - vm.isAdmin = (Number(vm.hasAdminRole) === 1) ? true : false; + vm.isAdmin = (Number(vm.hasAdminRole) === 1); vm.enabled = vm.isAdmin ? 0 : 1; vm.toggle = toggle;