Skip to content

Commit

Permalink
Merge branch 'hotfix/build-error'
Browse files Browse the repository at this point in the history
  • Loading branch information
randilfernando committed Dec 27, 2017
2 parents 10568fa + 371a72c commit eb9fcd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/auth/providers/permission.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class PermissionProvider {
public async setPermissionByUserRoleId(userRoleId: number) {
if (this.authConfig.userPermissionsEnabled) {
await this.loadUserPermissionDataSet();
if (this.permissionDataSet && this.permissionDataSet === 0) {
if (this.permissionDataSet && this.permissionDataSet.length === 0) {
throw new Error('permissions not loaded');
}
const userPermissions = this.permissionDataSet.filter(up => up.userRoleId === userRoleId)[0];
Expand Down

0 comments on commit eb9fcd5

Please sign in to comment.