Prevent multi URL picker from crashing with JS errors when absolute (non-local) links are added.

This commit is contained in:
Kenn Jacobsen
2020-02-10 13:59:11 +01:00
committed by Sebastiaan Janssen
parent c5ddba47a8
commit 2c9c5baae5

View File

@@ -147,7 +147,7 @@ function multiUrlPickerController($scope, angularHelper, localizationService, en
_.each($scope.model.value, function (item){
// we must reload the "document" link URLs to match the current editor culture
if (item.udi.indexOf("/document/") > 0) {
if (item.udi && item.udi.indexOf("/document/") > 0) {
item.url = null;
entityResource.getUrlByUdi(item.udi).then(function (data) {
item.url = data;