Don't crash the linkpicker if only an anchor has been entered
This commit is contained in:
committed by
Sebastiaan Janssen
parent
2428af3c40
commit
1089b4b9bb
@@ -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