mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-01-05 10:25:00 +01:00
[API] Fix bug
This commit is contained in:
parent
9651b92819
commit
9c385214bd
1 changed files with 5 additions and 0 deletions
|
@ -174,6 +174,11 @@ module.exports = (params, user, app) =>
|
||||||
return rej('poll choices must be an array');
|
return rej('poll choices must be an array');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 選択肢が空の配列でエラー
|
||||||
|
if (poll.choices.length == 0) {
|
||||||
|
return rej('poll choices is required');
|
||||||
|
}
|
||||||
|
|
||||||
// Validate each choices
|
// Validate each choices
|
||||||
const shouldReject = poll.choices.some(choice => {
|
const shouldReject = poll.choices.some(choice => {
|
||||||
if (typeof choice !== 'string') return true;
|
if (typeof choice !== 'string') return true;
|
||||||
|
|
Loading…
Reference in a new issue