Skip to content

Commit

Permalink
fix: do not overwrite the default config object
Browse files Browse the repository at this point in the history
  • Loading branch information
XVincentX committed Mar 25, 2019
1 parent 2d200f9 commit bcb20f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/http-server/src/getHttpConfigFromRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ export const getHttpConfigFromRequest: PrismConfigFactory<IHttpConfig, IHttpRequ
) => {
// For some reason this fixed the code coverage.
let config: IHttpConfig = { mock: true };

if (defaultConfig) {
config = resolveConfig<IHttpConfig, IHttpRequest>(req, defaultConfig);
config = Object.assign({ mock: true }, resolveConfig<IHttpConfig, IHttpRequest>(req, defaultConfig));
}

const httpOperationConfig: any = {};
Expand Down

0 comments on commit bcb20f5

Please sign in to comment.