diff options
-rw-r--r-- | source/features/linkify-user-location.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/features/linkify-user-location.tsx b/source/features/linkify-user-location.tsx index 947819f2..214c636e 100644 --- a/source/features/linkify-user-location.tsx +++ b/source/features/linkify-user-location.tsx @@ -1,11 +1,15 @@ import React from 'dom-chef'; import select from 'select-dom'; -import {wrap} from '../libs/dom-utils'; +import {wrap, isEditable} from '../libs/dom-utils'; import features from '../libs/features'; function addLocation(baseElement: HTMLElement): void { for (const {nextElementSibling, nextSibling} of select.all('.octicon-location', baseElement)) { const location = nextElementSibling || nextSibling!; // `nextSibling` alone might point to an empty TextNode before an element, if there’s an element + if (isEditable(location)) { + continue; + } + const locationName = location.textContent!.trim(); const googleMapsLink = `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(locationName)}`; |