mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-29 09:03:01 +00:00
refactor: use ??
This commit is contained in:
parent
b4be9d270c
commit
4ea1a173a8
1 changed files with 2 additions and 2 deletions
|
@ -556,7 +556,7 @@ function saveDraft() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteDraft() {
|
function deleteDraft() {
|
||||||
const draftData = JSON.parse(localStorage.getItem('drafts') || '{}');
|
const draftData = JSON.parse(localStorage.getItem('drafts') ?? '{}');
|
||||||
|
|
||||||
delete draftData[draftKey];
|
delete draftData[draftKey];
|
||||||
|
|
||||||
|
@ -571,7 +571,7 @@ async function post() {
|
||||||
renoteId: props.renote ? props.renote.id : quoteId ? quoteId : undefined,
|
renoteId: props.renote ? props.renote.id : quoteId ? quoteId : undefined,
|
||||||
channelId: props.channel ? props.channel.id : undefined,
|
channelId: props.channel ? props.channel.id : undefined,
|
||||||
poll: poll,
|
poll: poll,
|
||||||
cw: useCw ? cw || '' : undefined,
|
cw: useCw ? cw ?? '' : undefined,
|
||||||
localOnly: localOnly,
|
localOnly: localOnly,
|
||||||
visibility: visibility,
|
visibility: visibility,
|
||||||
visibleUserIds: visibility === 'specified' ? visibleUsers.map(u => u.id) : undefined,
|
visibleUserIds: visibility === 'specified' ? visibleUsers.map(u => u.id) : undefined,
|
||||||
|
|
Loading…
Reference in a new issue