Skip to content

Commit

Permalink
Default type
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRappl committed Oct 31, 2019
1 parent 83de8eb commit 26a4fce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/injectors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function normalizeRequest(targets: Array<string>, req: Request): KrasRequest {
async function tryInjectors(injectors: Array<KrasInjector>, req: KrasRequest): Promise<KrasAnswer | void> {
if (injectors.length > 0) {
const injector = injectors.shift();
const { ignore, handle } = injector.config || {};
const { ignore, handle } = injector.config || { ignore: undefined, handle: undefined };
const ignored = ignore && ignore.some(t => normalizeTarget(t) === req.target);
const handled = !handle || handle.some(t => normalizeTarget(t) === req.target);
const response = !ignored && handled && (await injector.handle(req));
Expand Down

0 comments on commit 26a4fce

Please sign in to comment.