fix unknown tag error from notes
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
a4570084ef
commit
57c0998eaa
@ -185,10 +185,14 @@ function extractTagRefs(fragments: Fragment[], tags: Array<Array<string>>) {
|
||||
if (i.startsWith("#")) {
|
||||
const tag = tags[Number(i.slice(2, -1))];
|
||||
if (tag) {
|
||||
return {
|
||||
type: "mention",
|
||||
content: `nostr:${NostrLink.fromTag(tag).encode()}`,
|
||||
} as ParsedFragment;
|
||||
try {
|
||||
return {
|
||||
type: "mention",
|
||||
content: `nostr:${NostrLink.fromTag(tag).encode()}`,
|
||||
} as ParsedFragment;
|
||||
} catch (e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
return i;
|
||||
|
Loading…
Reference in New Issue
Block a user