mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
fix : check undefined palette
This commit is contained in:
parent
f2f8158efb
commit
d1b12a07ac
@ -52,7 +52,7 @@
|
||||
if (max) {
|
||||
colorsArray = colorsArray.slice(0, Constants.MAX_CURRENT_COLORS_DISPLAYED);
|
||||
}
|
||||
|
||||
|
||||
return this.colorSorter.sort(colorsArray);
|
||||
};
|
||||
|
||||
@ -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 () {
|
||||
|
Loading…
Reference in New Issue
Block a user