From 36289f5d1b7b3017c3778f29f0520805e266d2f0 Mon Sep 17 00:00:00 2001 From: coresh <1753595@gmail.com> Date: Thu, 13 Oct 2016 07:12:01 +0000 Subject: [PATCH] Exclude TypeError output like: "Uncaught TypeError: jit.split is not a function" Force jit variable to string: to exclude TypeError like: "Uncaught TypeError: jit.split is not a function" jid.split("/")[0] -> jid.toString().split("/")[0] --- src/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.js b/src/core.js index f0b5634a..2eac48bd 100644 --- a/src/core.js +++ b/src/core.js @@ -827,7 +827,7 @@ Strophe = { */ getBareJidFromJid: function (jid) { - return jid ? jid.split("/")[0] : null; + return jid ? jid.toString().split("/")[0] : null; }, /** Function: log