Skip to content

Commit

Permalink
url: delete href cache on all setter code paths
Browse files Browse the repository at this point in the history
PR-URL: #1589
Fixes: #1588
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
petkaantonov committed May 3, 2015
1 parent b4f5898 commit dbdd81a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/url.js
Expand Up @@ -1041,8 +1041,8 @@ Object.defineProperty(Url.prototype, 'host', {
this._port = -1;
this._hostname = this._host = encodeURIComponent(host);
}
this._href = '';
}
this._href = '';
},
enumerable: true,
configurable: true
Expand All @@ -1068,9 +1068,8 @@ Object.defineProperty(Url.prototype, 'hostname', {
this._host = hostname + ':' + this._port;
else
this._host = hostname;

this._href = '';
}
this._href = '';
},
enumerable: true,
configurable: true
Expand All @@ -1089,8 +1088,8 @@ Object.defineProperty(Url.prototype, 'hash', {
hash = '#' + hash;
}
this._hash = hash;
this._href = '';
}
this._href = '';
},
enumerable: true,
configurable: true
Expand All @@ -1114,8 +1113,8 @@ Object.defineProperty(Url.prototype, 'search', {
if (this._parsesQueryStrings) {
this.query = querystring.parse(search.slice(1));
}
this._href = '';
}
this._href = '';
},
enumerable: true,
configurable: true
Expand All @@ -1138,8 +1137,8 @@ Object.defineProperty(Url.prototype, 'pathname', {
}

this._pathname = pathname;
this._href = '';
}
this._href = '';
},
enumerable: true,
configurable: true
Expand Down

0 comments on commit dbdd81a

Please sign in to comment.