diff options
author | Lionel Han <47760119+IGoByJoe@users.noreply.github.com> | 2020-06-15 19:27:59 -0700 |
---|---|---|
committer | Lionel Han <47760119+IGoByJoe@users.noreply.github.com> | 2020-06-15 19:27:59 -0700 |
commit | 099a1942440efc2784bc9b2c5896777cf85842ec (patch) | |
tree | 56a598398fab001fb6625e20fb8c9797f71c733d /src/fields/RichTextUtils.ts | |
parent | 3cb0b3aac05d9525d6deb4683328ce1309beee32 (diff) | |
parent | 163e1f579d5a6b111645953b12e665839694585c (diff) |
pull from master and cleaning up code
Diffstat (limited to 'src/fields/RichTextUtils.ts')
-rw-r--r-- | src/fields/RichTextUtils.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fields/RichTextUtils.ts b/src/fields/RichTextUtils.ts index f81ec8c6d..66959882d 100644 --- a/src/fields/RichTextUtils.ts +++ b/src/fields/RichTextUtils.ts @@ -392,7 +392,7 @@ export namespace RichTextUtils { const { attrs } = mark; switch (converted) { case "link": - let url = attrs.href; + let url = attrs.allHrefs.length ? attrs.allHrefs[0].href : ""; const delimiter = "/doc/"; const alreadyShared = "?sharing=true"; if (new RegExp(window.location.origin + delimiter).test(url) && !url.endsWith(alreadyShared)) { |