Skip to content

Commit

Permalink
Fix linter errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
onurtemizkan committed Mar 20, 2024
1 parent 89b1d2f commit 465180f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,7 @@ export class ExpressInstrumentation extends InstrumentationBase<
) {
const route = original.apply(this, args);
const layer = this.stack[this.stack.length - 1] as ExpressLayer;
instrumentation._applyPatch(
layer,
getLayerPath(args)
);
instrumentation._applyPatch(layer, getLayerPath(args));
return route;
};
};
Expand All @@ -145,10 +142,7 @@ export class ExpressInstrumentation extends InstrumentationBase<
) {
const route = original.apply(this, args);
const layer = this.stack[this.stack.length - 1] as ExpressLayer;
instrumentation._applyPatch(
layer,
getLayerPath(args)
);
instrumentation._applyPatch(layer, getLayerPath(args));
return route;
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ export const asErrorAndMessage = (
? [error, error.message]
: [String(error), String(error)];


/**
* Extracts the layer path from the route arguments
*
Expand All @@ -163,10 +162,10 @@ export const getLayerPath = (args: unknown[]): string | undefined => {
}

if (Array.isArray(args[0])) {
return args[0].map((arg) => (
typeof arg === 'string' || arg instanceof RegExp ? arg : '')
).join(',');
return args[0]
.map(arg => (typeof arg === 'string' || arg instanceof RegExp ? arg : ''))
.join(',');
}

return;
}
};

0 comments on commit 465180f

Please sign in to comment.