Bug fix in extractEventFromNote with minimum Note
This commit is contained in:
parent
a4c726498b
commit
bcbc261e3b
|
@ -41,8 +41,9 @@ export class ApEventService {
|
|||
throw new Error('invalid type');
|
||||
}
|
||||
|
||||
const title = note.name!;
|
||||
const start = note.startTime!;
|
||||
if (note.name && note.startTime) {
|
||||
const title = note.name;
|
||||
const start = note.startTime;
|
||||
const end = note.endTime ?? null;
|
||||
|
||||
return {
|
||||
|
@ -51,5 +52,8 @@ export class ApEventService {
|
|||
end,
|
||||
metadata: {},
|
||||
};
|
||||
} else {
|
||||
throw new Error('Invalid event properties')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue