fixing showinc calendar events bug
This commit is contained in:
parent
f84250cb6f
commit
d659e5f9cb
@ -43,7 +43,7 @@ export default function CalendarCard({ calendar }: CalendarCardProps) {
|
|||||||
const calendarEventIdentifiers = calendarEvents
|
const calendarEventIdentifiers = calendarEvents
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
.map((e) => {
|
.map((e) => {
|
||||||
if (nip19.BECH32_REGEX.test(e) && e.includes(":")) {
|
if (e.includes(":") && e.split(":").length === 3) {
|
||||||
const [kind, pubkey, identifier] = e.split(":") as [
|
const [kind, pubkey, identifier] = e.split(":") as [
|
||||||
string,
|
string,
|
||||||
string,
|
string,
|
||||||
|
@ -26,7 +26,7 @@ export default function EventsFromCalendar({
|
|||||||
const calendarEventIdentifiers = calendarEvents
|
const calendarEventIdentifiers = calendarEvents
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
.map((e) => {
|
.map((e) => {
|
||||||
if (nip19.BECH32_REGEX.test(e) && e.includes(":")) {
|
if (e.includes(":") && e.split(":").length === 3) {
|
||||||
const [kind, pubkey, identifier] = e.split(":") as [
|
const [kind, pubkey, identifier] = e.split(":") as [
|
||||||
string,
|
string,
|
||||||
string,
|
string,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user