undefineds
This commit is contained in:
parent
f39a3eeb32
commit
f16e19d2b2
16 changed files with 25 additions and 25 deletions
|
|
@ -237,10 +237,10 @@ export const changeStatusScope = ({
|
|||
credentials,
|
||||
}) => {
|
||||
const payload = {}
|
||||
if (typeof sensitive !== 'undefined') {
|
||||
if (sensitive !== undefined) {
|
||||
payload['sensitive'] = sensitive
|
||||
}
|
||||
if (typeof visibility !== 'undefined') {
|
||||
if (visibility !== undefined) {
|
||||
payload['visibility'] = visibility
|
||||
}
|
||||
|
||||
|
|
@ -260,15 +260,15 @@ export const announcementToPayload = ({
|
|||
}) => {
|
||||
const payload = { content }
|
||||
|
||||
if (typeof startsAt !== 'undefined') {
|
||||
if (startsAt !== undefined) {
|
||||
payload.starts_at = startsAt ? new Date(startsAt).toISOString() : null
|
||||
}
|
||||
|
||||
if (typeof endsAt !== 'undefined') {
|
||||
if (endsAt !== undefined) {
|
||||
payload.ends_at = endsAt ? new Date(endsAt).toISOString() : null
|
||||
}
|
||||
|
||||
if (typeof allDay !== 'undefined') {
|
||||
if (allDay !== undefined) {
|
||||
payload.all_day = allDay
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue