Not the developer but nice catch. const match would be null, not undefined, if the regex search does not match, right?
> const match = /^\/[js]\/(\d+)\/?$/.exec("something")
> undefined
[1] https://tc39.es/ecma262/multipage/ecmascript-language-statem... [2] https://tc39.es/ecma262/multipage/ecmascript-language-statem...
What fun! :-)
Edit: apparently as also mentioned https://news.ycombinator.com/item?id=30268412