fix : check undefined palette

This commit is contained in:
juliandescottes 2015-04-13 13:29:13 +02:00
parent f2f8158efb
commit d1b12a07ac

View File

@ -60,7 +60,7 @@
var paletteId = pskl.UserSettings.get(pskl.UserSettings.SELECTED_PALETTE);
var palette = this.paletteService.getPaletteById(paletteId);
return palette.id === Constants.CURRENT_COLORS_PALETTE_ID;
return palette && palette.id === Constants.CURRENT_COLORS_PALETTE_ID;
};
ns.CurrentColorsService.prototype.loadColorsFromCache_ = function () {