Permalink
Browse files

Fixed getBareJidFromJid to return null on bad input. Found by Jamie J.

  • Loading branch information...
1 parent f68a706 commit 98b032705a419079e1f10849c0eae9702bcf9248 @metajack metajack committed Apr 20, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core.js
View
@@ -647,7 +647,7 @@ Strophe = {
*/
getBareJidFromJid: function (jid)
{
- return jid.split("/")[0];
+ return jid ? jid.split("/")[0] : null;
},
/** Function: log

0 comments on commit 98b0327

Please sign in to comment.