From d148e93b458f84b652c45ee4847f5b30dd73c3c3 Mon Sep 17 00:00:00 2001 From: mwillebrands Date: Tue, 21 Feb 2023 10:59:13 +0100 Subject: [PATCH] Fix for #13860 Undefined error when inserting an empty link in the RTE editor (cherry picked from commit 6ce30fb56129f0c42b371ac63a2629d20782226c) # Conflicts: # src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js --- .../src/common/services/tinymce.service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js index 850a173f8d..afb3fa1e84 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js @@ -1253,7 +1253,7 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s // the href might be an external url, so check the value for an anchor/qs // href has the anchor re-appended later, hence the reset here to avoid duplicating the anchor - if (!target.anchor) { + if (!target.anchor && href) { var urlParts = href.split(/(#|\?)/); if (urlParts.length === 3) { href = urlParts[0];