From ebb9c7e0e60f2f78158b35d190dfb08f14aaa494 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Wed, 13 Jan 2016 10:59:56 +0200 Subject: [PATCH] Fix match issue some people are having --- Plugins/CustomGame.plugin.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Plugins/CustomGame.plugin.js b/Plugins/CustomGame.plugin.js index ea71237..7981ba6 100644 --- a/Plugins/CustomGame.plugin.js +++ b/Plugins/CustomGame.plugin.js @@ -59,7 +59,10 @@ customGamePlugin.prototype.setGame = function(game) { customGamePlugin.prototype.setPlaying = function() { if(!this.enabled) return; - if(this.uid == null) this.uid = $(".account .avatar-small").css("background-image").match(/\d+/); + if(this.uid == null) { + if($(".account .avatar-small").css("background-image") == undefined)return; + this.uid = $(".account .avatar-small").css("background-image").match(/\d+/); + } if(this.game == null) this.game = ""; @@ -78,4 +81,4 @@ customGamePlugin.prototype.setPlaying = function() { } BdApi.setPlaying(this.game); -}; \ No newline at end of file +};