Skip to content

Commit

Permalink
Fix es error
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Wang <i@ryanc.cc>
  • Loading branch information
ruibaby committed Jun 25, 2023
1 parent f7c094a commit 9615bac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion console/src/utils/permission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function usePermission(): usePermissionReturn {
const currentUserHasPermission = (
targetPermissions?: Array<string>
): boolean => {
return hasPermission(uiPermissions, targetPermissions, true);
return hasPermission(uiPermissions, targetPermissions || [], true);
};

return {
Expand Down

0 comments on commit 9615bac

Please sign in to comment.