aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarzavec <admin@marzavec.com>2019-04-26 15:26:36 +0200
committerGitHub <noreply@github.com>2019-04-26 15:26:36 +0200
commitf16b7b7a4977304dda01bffa2b35df73241aea61 (patch)
tree6ac2cfe110e4a27f3f6d674beaf05ae0df31ecdb
parentMerge pull request #60 from MinusGix/patch-5 (diff)
parentUpdate client.js (diff)
downloadhackchat-f16b7b7a4977304dda01bffa2b35df73241aea61.tar.gz
hackchat-f16b7b7a4977304dda01bffa2b35df73241aea61.zip
Merge pull request #61 from MinusGix/patch-1
Fix issue of the client not seeing disconnection if they have no myNick variable
Diffstat (limited to '')
-rw-r--r--client/client.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/client.js b/client/client.js
index 230b211..2e9a255 100644
--- a/client/client.js
+++ b/client/client.js
@@ -177,7 +177,7 @@ function pushMessage(args) {
// Message container
var messageEl = document.createElement('div');
- if (args.text.includes('@' + myNick.split('#')[0] + ' ')) {
+ if (typeof(myNick) === 'string' && args.text.includes('@' + myNick.split('#')[0] + ' ')) {
messageEl.classList.add('refmessage');
} else {
messageEl.classList.add('message');