Skip to content

Commit

Permalink
remove deep clone
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMagee committed Apr 9, 2020
1 parent ae2b5db commit cc7d8d0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/datasource/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
GetPkgReleasesConfig,
} from './common';
import datasources from './api.generated';
import { clone } from '../util/clone';

export * from './common';

Expand All @@ -34,10 +33,11 @@ function applyReplacements(
config: GetReleasesInternalConfig
): ReleaseResult {
if (config.replacementName && config.replacementVersion) {
const ret = clone(dep);
ret.replacementName = config.replacementName;
ret.replacementVersion = config.replacementVersion;
return ret;
return {
...dep,
replacementName: config.replacementName,
replacementVersion: config.replacementVersion,
};
}
return dep;
}
Expand Down

0 comments on commit cc7d8d0

Please sign in to comment.