svelte-page-router
svelte-page-router copied to clipboard
next is undefined
Hi, i just wanted to try out your library and found that when using hook, in
(ctx, next) => {
// do something
next();
}
next is undefined.
I spotted the issue in your index.mjs
on line 23, when you call the hooks
Promise.all(this._hooks.map((p) => p(ctx))).then(next);
but shouldn't it be like this:
Promise.all(this._hooks.map((p) => p(ctx, next))).then(next);