Closed jywarren closed 3 years ago
So the line of code is:
if("Choose a palette..."!=r)palettes[r].specified||history.pushState
So I think probably line 36 of:
palettes
is not defined in that file, and there was an edit 27 days ago, so I wonder...
Here, in the last commit affecting that file, it seems to be a global:
It is a global, from the JS console of the live app!
OK, i think i figured this out. When you first load the editor, you see this, where both dropdowns say Choose a _____...
But, unfortunately, when you choose a preset, it inserts that selection into the 2nd dropdown, even though that's not a valid choice:
Then when you press Create
it tries to select a palette that doesn't exist (like Pico 8
, in my screenshot).
What's happening is that when the preset is selected, it's adding the preset's palette
property to the palettes dropdown. See the presets here:
"{"Gameboy Color":{"width":240,"height":203,"palette":"Gameboy Color"},"PICO-8":{"width":128,"height":128,"palette":"PICO-8"},"Commodore 64":{"width":40,"height":80,"palette":"Commodore 64"}}"
The palette options don't include these: "Endesga 32", "Zughy 32", "AAP-64", "Pear36", "Endesga 64", "Sweetie 16", "Journey", "Famicube", "Fantasy 24", "Vinik24"
I looked through recent changes to see if recent changes might have affected this, but couldn't trace where the palettes themselves are generated...
BUT:
Just manually select a palette that DOES exist, and you can make an icon!
I'm seeing this error on trying to create a new drawing. I love lospec! Thanks for an awesome app!