Skip to content

Commit

Permalink
package_assets key in EPM packages SO is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
John Schulz committed Feb 17, 2021
1 parent 2c89413 commit d22e603
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x-pack/plugins/fleet/server/services/epm/archive/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ export async function archiveEntryToESDocument(opts: {

export async function removeArchiveEntries(opts: {
savedObjectsClient: SavedObjectsClientContract;
refs: PackageAssetReference[];
refs?: PackageAssetReference[];
}) {
const { savedObjectsClient, refs } = opts;
if (!refs) return;
const results = await Promise.all(
refs.map((ref) => savedObjectsClient.delete(ASSETS_SAVED_OBJECT_TYPE, ref.id))
);
Expand Down

0 comments on commit d22e603

Please sign in to comment.