Skip to content
Snippets Groups Projects
Unverified Commit 726d5a17 authored by syuilo's avatar syuilo Committed by GitHub
Browse files

Merge pull request #1685 from 2vg/patch-1

fix: when text is null, bug can pass validation.
parents fe159a13 33495b5c
No related branches found
No related tags found
No related merge requests found
......@@ -140,7 +140,7 @@ module.exports = (params, user: ILocalUser, app: IApp) => new Promise(async (res
}
// テキストが無いかつ添付ファイルが無いかつ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');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment