Skip to content

Commit dc9ff38

Browse files
committed
Fixes TypeError for domain() when domain reads as blank.
1 parent 357a093 commit dc9ff38

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/URI.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ p.domain = function(v, build) {
863863

864864
// if hostname consists of 1 or 2 segments, it must be the domain
865865
var t = this._parts.hostname.match(/\./g);
866-
if (t.length < 2) {
866+
if (t && t.length < 2) {
867867
return this._parts.hostname;
868868
}
869869

0 commit comments

Comments
 (0)