don't crash if the user clears the game data field
This commit is contained in:
parent
1f793bf9ca
commit
fa7ab9a25f
|
@ -104,10 +104,14 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleBitsyGameData() {
|
function handleBitsyGameData() {
|
||||||
bitsyData = {};
|
|
||||||
|
|
||||||
var input = $('#bitsy-data').val();
|
var input = $('#bitsy-data').val();
|
||||||
|
|
||||||
|
if ( ! input) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bitsyData = {};
|
||||||
|
|
||||||
// get palettes
|
// get palettes
|
||||||
var palettes = input.match(/PAL (.*)\s(NAME (.*)\s)?([0-9,]*[\s]){3}/g);
|
var palettes = input.match(/PAL (.*)\s(NAME (.*)\s)?([0-9,]*[\s]){3}/g);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue