From 705918bb1acdd56937c5ee2cadaf78e3f7bd0d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Krysiak?= Date: Mon, 30 Jan 2017 05:04:57 +0100 Subject: [PATCH] fix: #365 - Issue of angular-permission-ui with gulp-uglify --- src/permission-ui/permission-ui.js | 12 +++++++----- src/permission/authorization/Authorization.js | 1 - 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/permission-ui/permission-ui.js b/src/permission-ui/permission-ui.js index f791bfa..d08f67e 100644 --- a/src/permission-ui/permission-ui.js +++ b/src/permission-ui/permission-ui.js @@ -10,7 +10,7 @@ function config($stateProvider) { 'ngInject'; - $stateProvider.decorator('$state', function (state) { + function $state($delegate) { /** * Property containing full state object definition * @@ -19,12 +19,14 @@ function config($stateProvider) { * * @returns {Object} */ - state.self.$$permissionState = function () { - return state; + $delegate.self.$$permissionState = function () { + return $delegate; }; - return state; - }); + return $delegate; + } + + $stateProvider.decorator('$state', $state); } /** diff --git a/src/permission/authorization/Authorization.js b/src/permission/authorization/Authorization.js index f307574..5647b00 100644 --- a/src/permission/authorization/Authorization.js +++ b/src/permission/authorization/Authorization.js @@ -35,7 +35,6 @@ function PermAuthorization($q) { * @param deferred {Object} Promise defer * @param map {permission.PermissionMap} Access rights map * - * @returns {Promise} $q.promise object */ function resolveExceptPrivilegeMap(deferred, map) { var exceptPromises = map.resolvePropertyValidity(map.except);