Skip to content

Commit

Permalink
Remove guard around metrics which is unnecessary after 48eab7e.
Browse files Browse the repository at this point in the history
  • Loading branch information
abernix committed Apr 28, 2020
1 parent 48eab7e commit a3c378b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/apollo-engine-reporting/src/plugin.ts
Expand Up @@ -52,11 +52,9 @@ export const plugin = <TContext>(
logger: requestContext.logger || logger,
});

const metrics: NonNullable<typeof requestContext['metrics']> =
((requestContext as Mutable<typeof requestContext>)
.metrics = requestContext.metrics || Object.create(null));

treeBuilder.startTiming();

const metrics = requestContext.metrics;
metrics.startHrTime = treeBuilder.startHrTime;

if (requestContext.request.http) {
Expand Down

0 comments on commit a3c378b

Please sign in to comment.