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