fixing showinc calendar events bug

This commit is contained in:
zmeyer44 2023-11-14 10:16:30 -05:00
parent f84250cb6f
commit d659e5f9cb
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ export default function CalendarCard({ calendar }: CalendarCardProps) {
const calendarEventIdentifiers = calendarEvents
.filter(Boolean)
.map((e) => {
if (nip19.BECH32_REGEX.test(e) && e.includes(":")) {
if (e.includes(":") && e.split(":").length === 3) {
const [kind, pubkey, identifier] = e.split(":") as [
string,
string,

View File

@ -26,7 +26,7 @@ export default function EventsFromCalendar({
const calendarEventIdentifiers = calendarEvents
.filter(Boolean)
.map((e) => {
if (nip19.BECH32_REGEX.test(e) && e.includes(":")) {
if (e.includes(":") && e.split(":").length === 3) {
const [kind, pubkey, identifier] = e.split(":") as [
string,
string,