Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
neptunian committed Jul 2, 2020
1 parent cce757d commit b13f8db
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,9 @@ export function createSavedObjectKibanaAsset(
// to be prepended with the package name to distinguish assets from Beats modules' assets
export const changeAssetIds = (asset: ArchiveAsset, pkgName: string): ArchiveAsset => {
const references = asset.references.map((ref) => {
if (ref.type !== KibanaAssetType.indexPattern) {
const id = getAssetId(ref.id, pkgName);
return { ...ref, id };
} else {
return ref;
}
if (ref.type === KibanaAssetType.indexPattern) return ref;
const id = getAssetId(ref.id, pkgName);
return { ...ref, id };
});
return {
...asset,
Expand All @@ -76,7 +73,7 @@ export async function installKibanaAssets(options: {

// Only install Kibana assets during package installation.
const kibanaAssetTypes = Object.values(KibanaAssetType);
const installationPromises = kibanaAssetTypes.map(async (assetType) =>
const installationPromises = kibanaAssetTypes.map((assetType) =>
installKibanaSavedObjects({ savedObjectsClient, assetType, paths, pkgName })
);

Expand Down

0 comments on commit b13f8db

Please sign in to comment.