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