-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
The following causes a TypeError when attempting to access u as an Array when it's null:
at Object.urlParser (as parse) in urlparser/index.js — line 129
TypeError: Cannot read property '1' of null
Code to replicate:
var urlparser = require("urlparser");
urlparser.parse("http:")
or
var urlparser = require("urlparser");
urlparser.parse("https:")
Would suggest simply checking for null from RegEx execution and return empty object in this case. I use this to validate URLs as a user is typing them in and so it blows up as they type.
Metadata
Metadata
Assignees
Labels
No labels