Remove all string object references (#586)

This commit is contained in:
Schuyler Cebulskie
2016-09-03 11:58:28 -04:00
committed by Amish Shah
parent ec0a5cdfbc
commit d97ce2e181
10 changed files with 19 additions and 23 deletions

View File

@@ -196,7 +196,7 @@ class TextBasedChannel {
*/
sendFile(attachment, fileName) {
if (!fileName) {
if (attachment instanceof String || typeof attachment === 'string') {
if (typeof attachment === 'string') {
fileName = path.basename(attachment);
} else if (attachment && attachment.path) {
fileName = path.basename(attachment.path);