Fixed bug for when the word isn't found in the wordlist.

This commit is contained in:
Douglas Muth 2016-07-10 18:31:33 -04:00
parent 7b5c1bb9ce
commit fda158bd7c

View file

@ -73,7 +73,15 @@ function roll_dice() {
*/
function get_word(wordlist, index) {
var retval = wordlist[index];
if (retval) {
retval = retval[0].toUpperCase() + retval.slice(1);
} else {
retval = "((Word not found in wordlist)) ";
}
return(retval);
}