Linearize docsURL implementation
This commit is contained in:
@@ -3308,14 +3308,12 @@ angular.module('syncthing.core')
|
|||||||
// Undefined or null should become a valid string.
|
// Undefined or null should become a valid string.
|
||||||
path = '';
|
path = '';
|
||||||
}
|
}
|
||||||
var hash = path.indexOf('#');
|
var hashIndex = path.indexOf('#');
|
||||||
if (hash != -1) {
|
url += '/' + (hashIndex === -1 ? path : path.slice(0, hashIndex));
|
||||||
url += '/' + path.slice(0, hash);
|
url += '?version=' + $scope.versionBase();
|
||||||
url += '?version=' + $scope.versionBase();
|
var hash = hashIndex === -1 ? '' : path.slice(hashIndex);
|
||||||
url += path.slice(hash);
|
if (hash) {
|
||||||
} else {
|
url += hash;
|
||||||
url += '/' + path;
|
|
||||||
url += '?version=' + $scope.versionBase();
|
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user