Skip to content

Commit

Permalink
remove useless comments
Browse files Browse the repository at this point in the history
  • Loading branch information
getlarge committed Apr 3, 2020
2 parents 1e0a785 + 7f94a5e commit 3882296
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/engine/action/Action.ts
Expand Up @@ -204,20 +204,13 @@ export class Action {

_processPermissions(): null | Permission | Permission[] {
if (this._permissions) {
// if (isArray(this._permissions)) { check type for each permission }

if (isFunction(this._permissions)) {
const permissionsFn = this._permissions as Function;
const permissions: Permission | Permission[] = permissionsFn();
return processActionPermissions(this, permissions);
}
const permissions = this._permissions as Permission | Permission[];
return processActionPermissions(this, permissions);

// const permissions = isFunction(this._permissions)
// ? this._permissions()
// : this._permissions;
// return processActionPermissions(this, permissions);
} else if (this._defaultPermissions) {
return processActionPermissions(this, this._defaultPermissions);
}
Expand All @@ -227,8 +220,6 @@ export class Action {

_generatePermissionDescriptions(): void {
if (this.permissions) {
// if (isArray(this._permissions)) { check type for each permission }

let permissions: Permission | Permission[];
if (isFunction(this._permissions)) {
const permissionsFn = this._permissions as Function;
Expand Down

0 comments on commit 3882296

Please sign in to comment.