diff options
| author | momf <m0fqn090310@gmail.com> | 2018-06-08 22:04:07 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-08 22:04:07 +0900 |
| commit | 33495b5cb327df1d02b728854bf93b3dc3188b9c (patch) | |
| tree | d97462df16d79f2804c97b33fbb36a787b7637de /src/server/api/endpoints | |
| parent | fix: when text is null, bug can pass validation. (diff) | |
| download | sharkey-33495b5cb327df1d02b728854bf93b3dc3188b9c.tar.gz sharkey-33495b5cb327df1d02b728854bf93b3dc3188b9c.tar.bz2 sharkey-33495b5cb327df1d02b728854bf93b3dc3188b9c.zip | |
fix: "or" operator.
Diffstat (limited to 'src/server/api/endpoints')
| -rw-r--r-- | src/server/api/endpoints/notes/create.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/api/endpoints/notes/create.ts b/src/server/api/endpoints/notes/create.ts index 89e72a184e..446764e1d6 100644 --- a/src/server/api/endpoints/notes/create.ts +++ b/src/server/api/endpoints/notes/create.ts @@ -140,7 +140,7 @@ module.exports = (params, user: ILocalUser, app: IApp) => new Promise(async (res } // テキストが無いかつ添付ファイルが無いかつRenoteも無いかつ投票も無かったらエラー - if ((text === undefined or text === null) && 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'); } |