fix bugs and position on safari

This commit is contained in:
JFH
2021-05-22 23:18:59 +02:00
parent 7a661d7bfc
commit 26fc8eeb49
4 changed files with 10 additions and 10 deletions

View File

@@ -794,7 +794,7 @@ export const setLinkURLMethod = function (val) {
if (elem.tagName !== 'a') {
// See if parent is an anchor
const parentsA = getParents(elem.parentNode, 'a');
if (parentsA.length) {
if (parentsA?.length) {
elem = parentsA[0];
} else {
return;

View File

@@ -875,7 +875,7 @@ export const ungroupSelectedElement = function () {
return;
}
const parentsA = getParents(g.parentNode, 'a');
if (parentsA.length) {
if (parentsA?.length) {
g = parentsA[0];
}