Undefined error when inserting an empty link in the RTE editor

(cherry picked from commit 6ce30fb561)

# Conflicts:
#	src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
This commit is contained in:
mwillebrands
2023-02-21 10:59:13 +01:00
committed by Sebastiaan Janssen
parent 0ce2fdb23b
commit d148e93b45

View File

@@ -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];