Skip to content

Commit 75939e1

Browse files
committed
fix: remove useless branch
1 parent 250e12a commit 75939e1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/util.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,7 @@ export function checkAbility(ability: Ability, resource: string, action: string,
312312
if (path && !foundOne) {
313313
const pathAsString = path.join('.');
314314
let isPermitted = fieldsCache.get(pathAsString);
315-
if (typeof isPermitted === 'boolean') {
316-
317-
} else {
315+
if (typeof isPermitted === 'undefined') {
318316
isPermitted = ability.can(action, resource, pathAsString);
319317
fieldsCache.set(pathAsString, isPermitted);
320318
}

0 commit comments

Comments
 (0)