don't crash if the user clears the game data field

This commit is contained in:
synth-ruiner 2018-03-03 09:21:28 +00:00
parent 1f793bf9ca
commit fa7ab9a25f
2 changed files with 6 additions and 3 deletions

View File

@ -104,10 +104,14 @@ $(document).ready(function() {
}
function handleBitsyGameData() {
bitsyData = {};
var input = $('#bitsy-data').val();
if ( ! input) {
return;
}
bitsyData = {};
// get palettes
var palettes = input.match(/PAL (.*)\s(NAME (.*)\s)?([0-9,]*[\s]){3}/g);

View File

@ -43,7 +43,6 @@ if (src.match(/^(file|https)?:\/\/|^\/\//)) {
## bugs
* does not work on ipad (can't scroll to the right?)
* completely fails if the user clears the game data field
## to do