Skip to content

Commit

Permalink
Remove redundant conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
jportner committed Nov 3, 2020
1 parent bd23001 commit e97acf0
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,6 @@ export class SecureSavedObjectsClientWrapper implements SavedObjectsClientContra
const namespaces = savedObject.namespaces.filter(
(x) => x !== ALL_SPACES_ID && !previouslyAuthorizedSpaceIds.includes(x)
);
if (namespaces.length === 0) {
return savedObject;
}

const privilegeMap = await this.getNamespacesPrivilegeMap(
namespaces,
Expand Down Expand Up @@ -698,9 +695,6 @@ export class SecureSavedObjectsClientWrapper implements SavedObjectsClientContra
const namespaces = uniq(
savedObjects.flatMap((savedObject) => savedObject.namespaces || [])
).filter((x) => x !== ALL_SPACES_ID && !previouslypreviouslyAuthorizedSpaceIds.includes(x));
if (namespaces.length === 0) {
return response;
}

const privilegeMap = await this.getNamespacesPrivilegeMap(
namespaces,
Expand Down

0 comments on commit e97acf0

Please sign in to comment.