switch to filter method
| @@ -1895,12 +1895,7 @@ async function getMessagesCallback(args, value) { | |||
| 1895 | 1895 | ||
| 1896 | const messages = await Promise.all(messagePromises); | 1896 | const messages = await Promise.all(messagePromises); |
| 1897 | 1897 | ||
| 1898 | for (let i = 0; i < messages.length; /**/ ) { | 1898 | return messages.filter(m => m !== null).join('\n\n'); |
| 1899 | if (messages[i] !== null) ++i; | ||
| 1900 | else messages.splice(i, 1); | ||
| 1901 | } | ||
| 1902 | |||
| 1903 | return messages.join('\n\n'); | ||
| 1904 | } | 1899 | } |
| 1905 | 1900 | ||
| 1906 | async function runCallback(args, name) { | 1901 | async function runCallback(args, name) { |