Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pathname can only be string #34

Open
vastwu opened this issue Apr 8, 2018 · 0 comments
Open

pathname can only be string #34

vastwu opened this issue Apr 8, 2018 · 0 comments
Labels

Comments

@vastwu
Copy link

vastwu commented Apr 8, 2018

* @param {String|RegExp} pathname path to match, can be regex

if (kindOf(pathname) !== 'string') {
throw new TypeError('koa-better-serve: expect `pathname` to be string')
}

const filepath = ctx.path.replace(pathname, '')

i think the code only support pathname which to be a String

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant