player tracker: if guess player levels installed but returns undefined, assume level 1 rather than showing nothing

(maybe this should be interlal to the guess-plyaer-levels plugin instead?)
This commit is contained in:
Jon Atkins 2013-04-14 18:54:59 +01:00
parent d4a3377a9a
commit 082125229d

View File

@ -266,6 +266,7 @@ window.plugin.playerTracker.drawData = function() {
if(window.plugin.guessPlayerLevels !== undefined &&
window.plugin.guessPlayerLevels.fetchLevelByPlayer !== undefined) {
var playerLevel = window.plugin.guessPlayerLevels.fetchLevelByPlayer(pguid);
if (playerLevel === undefined) playerLevel = 1; //if player level unknown, assume level 1
if(playerLevel !== undefined) {
title += '<span style="font-weight:bold;margin-left:10px;">Level '
+ playerLevel