Don't crash the linkpicker if only an anchor has been entered
(cherry picked from commit 1089b4b9bb)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
08c3b6bff5
commit
a2899b21b6
@@ -93,7 +93,7 @@ angular.module("umbraco").controller("Umbraco.Editors.LinkPickerController",
|
||||
});
|
||||
|
||||
}
|
||||
} else if ($scope.model.target.url.length) {
|
||||
} else if ($scope.model.target.url && $scope.model.target.url.length) {
|
||||
// a url but no id/udi indicates an external link - trim the url to remove the anchor/qs
|
||||
// only do the substring if there's a # or a ?
|
||||
var indexOfAnchor = $scope.model.target.url.search(/(#|\?)/);
|
||||
|
||||
Reference in New Issue
Block a user