Skip to content

How about match an empty array? #291

@circlesharp

Description

@circlesharp

I pass an empty array in match function, then I get trouble:

const { match } = require('path-to-regexp')
urlMatchFn = match([])

console.log(urlMatchFn('/foo')) // { path: '', index: 0, params: [Object: null prototype] {} }

Shoule the result be false? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions