We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ded128 commit ba8e588Copy full SHA for ba8e588
ts/services/LinkPreview.preload.ts
@@ -96,11 +96,15 @@ function _maybeGrabLinkPreview(
96
return;
97
}
98
99
- const links = LinkPreview.findLinks(message, caretLocation);
100
- if (currentlyMatchedLink && links.includes(currentlyMatchedLink)) {
101
- return;
+ if (currentlyMatchedLink) {
+ const allLinks = LinkPreview.findLinks(message);
+
102
+ if (allLinks.includes(currentlyMatchedLink)) {
103
+ return;
104
+ }
105
106
107
+ const links = LinkPreview.findLinks(message, caretLocation);
108
currentlyMatchedLink = undefined;
109
excludedPreviewUrls = excludedPreviewUrls || [];
110
0 commit comments