We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed44d9b commit 8d166dcCopy full SHA for 8d166dc
src/MiddleWare.ts
@@ -26,7 +26,7 @@ export class MiddleWare<I extends unknown[], O> {
26
const hooks = this.#hooks.filter((hook) => hook.patterns.find((pattern) => minimatch(pth, pattern)));
27
28
if (hooks.length === 0) return undefined;
29
- if (hooks.length === 1) return hooks[0].callback(...inputs);
+ if (hooks.length === 1) return hooks[0].callback.apply(null, inputs);
30
31
throw new Error(`Multiple hooks found for file ${pth}`);
32
}
0 commit comments