Browse Source

Fix TypeError when checking for file message caption (#322)

Danilo Bargen 8 years ago
parent
commit
db90c43a1d
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/directives/message_text.ts

+ 1 - 2
src/directives/message_text.ts

@@ -40,8 +40,7 @@ export default [
                         break;
                     case 'file':
                         // Prefer caption for file messages, if available
-                        if (message.caption !== null
-                                && message.caption.length > 0) {
+                        if (message.caption && message.caption.length > 0) {
                             rawText = message.caption;
                         } else {
                             rawText = message.file.name;