fix palette setting (#2)

This commit is contained in:
mellodoot 2023-10-02 14:17:45 +01:00
parent f3dfda066e
commit c94a73d3a3

View file

@ -51,7 +51,7 @@ const PALETTE = {
* sets the colour palette using the name ("example.palette") or reference to a palette (PALETTE.example)
*/
function set_palette(palette) {
if (typeof(palette) === "object" && Array.isArray(palette)) {
if (palette.constructor == Array) {
set_colours(palette[0], palette[1]);
console.log(`Palette changed to [${palette}]`);
return true;