revert: "Improved TextBasedChannel#send (#2537)"

This reverts commit 556e679bdb,
which broke resolving of non object literal message options.
This commit is contained in:
SpaceEEC 2018-05-04 16:44:06 +02:00
parent 556e679bdb
commit 90312952d9
No known key found for this signature in database
GPG key ID: 8C8A2E338661B871

View file

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