Improved TextBasedChannel#send (#2537)

This commit is contained in:
Kyra
2018-05-04 14:56:22 +02:00
committed by Crawl
parent 7a3a4d1388
commit 556e679bdb

View File

@@ -107,8 +107,8 @@ class TextBasedChannel {
* .then(console.log)
* .catch(console.error);
*/
send(content, options) { // eslint-disable-line complexity
if (!options && typeof content === 'object' && !(content instanceof Array)) {
send(content, options) {
if (content && content.constructor === Object && !options) {
options = content;
content = null;
} else if (!options) {