mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-14 10:05:46 +01:00
Merge pull request #1685 from 2vg/patch-1
fix: when text is null, bug can pass validation.
This commit is contained in:
commit
726d5a177e
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ module.exports = (params, user: ILocalUser, app: IApp) => new Promise(async (res
|
||||||
}
|
}
|
||||||
|
|
||||||
// テキストが無いかつ添付ファイルが無いかつRenoteも無いかつ投票も無かったらエラー
|
// テキストが無いかつ添付ファイルが無いかつRenoteも無いかつ投票も無かったらエラー
|
||||||
if (text === undefined && files === null && renote === null && poll === undefined) {
|
if ((text === undefined || text === null) && files === null && renote === null && poll === undefined) {
|
||||||
return rej('text, mediaIds, renoteId or poll is required');
|
return rej('text, mediaIds, renoteId or poll is required');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue