Skip to content

Commit

Permalink
fix(core/transform): fixes replace
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamel committed Oct 17, 2019
1 parent 79553ad commit f44035f
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions packages/core/src/transform/replace/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,27 +121,19 @@ export function nextService<E extends Service>(
if (typeof service.types.request !== 'string') {
const path = data.path.concat(['types', 'request']);
const route = data.route.concat(['request']);
service.types.request = nextType(
service.types.request,
{ path, route },
cb
);
service.types.request = next(service.types.request, { path, route }, cb);
}

if (typeof service.types.response !== 'string') {
const path = data.path.concat(['types', 'response']);
const route = data.route.concat(['response']);
service.types.response = nextType(
service.types.response,
{ path, route },
cb
);
service.types.response = next(service.types.response, { path, route }, cb);
}
for (const [name, error] of Object.entries(service.types.errors)) {
if (typeof error !== 'string') {
const path = data.path.concat(['types', 'errors', name]);
const route = data.route.concat(['errors', name]);
service.types.errors[name] = nextType(error, { path, route }, cb);
service.types.errors[name] = next(error, { path, route }, cb);
}
}

Expand Down

0 comments on commit f44035f

Please sign in to comment.