From bf61035e7e326e05b042b20f821897aec0fe30d5 Mon Sep 17 00:00:00 2001 From: Pavel Kvach Date: Mon, 15 Apr 2024 14:20:00 +0300 Subject: [PATCH] fix(evernote): Fix placement of Toggl link in UI (#2286) Closes #2134 --- src/content/evernote.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/content/evernote.js b/src/content/evernote.js index 6b714a1e8..143112e39 100644 --- a/src/content/evernote.js +++ b/src/content/evernote.js @@ -26,8 +26,9 @@ togglbutton.render('#qa-NOTE_HEADER:not(.toggl)', { observe: true }, function (e }); // Insert at the start of the same header segment as the share button - elem - .querySelector('#qa-SHARE_BUTTON') - .parentNode - .prepend(link); + const shareButton = elem.querySelector('#qa-SHARE_BUTTON'); + if (shareButton) { + const shareButtonParent = shareButton.parentNode; + shareButtonParent.parentNode.prepend(link); + } });