Skip to content

Commit 2353799

Browse files
committed
Delete unused variables and unused code paths.
1 parent 8ab8d3e commit 2353799

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/URI.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ for (_part in _parts) {
356356
URI.encodeReserved = generateAccessor("reserved", "encode");
357357

358358
URI.parse = function(string, parts) {
359-
var pos, t;
359+
var pos;
360360
if (!parts) {
361361
parts = {};
362362
}
@@ -1575,15 +1575,11 @@ p.normalizePath = function(build) {
15751575
}
15761576

15771577
var _was_relative;
1578-
var _was_relative_prefix;
15791578
var _path = this._parts.path;
15801579
var _parent, _pos;
15811580

15821581
// handle relative paths
15831582
if (_path.charAt(0) !== '/') {
1584-
if (_path.charAt(0) === '.') {
1585-
_was_relative_prefix = _path.substring(0, _path.indexOf('/'));
1586-
}
15871583
_was_relative = true;
15881584
_path = '/' + _path;
15891585
}
@@ -1762,7 +1758,7 @@ p.absoluteTo = function(base) {
17621758
p.relativeTo = function(base) {
17631759
var relative = this.clone();
17641760
var properties = ['protocol', 'username', 'password', 'hostname', 'port'];
1765-
var common, _base, _this, _base_diff, _this_diff;
1761+
var common, _base, _this, _this_diff;
17661762

17671763
if (relative._parts.urn) {
17681764
throw new Error('URNs do not have any generally defined hierachical components');
@@ -1801,7 +1797,6 @@ p.relativeTo = function(base) {
18011797
return relative.build();
18021798
}
18031799

1804-
_base_diff = _base.substring(common.length);
18051800
_this_diff = _this.substring(common.length);
18061801

18071802
// this is a descendant of base

0 commit comments

Comments
 (0)