Skip to content

Commit

Permalink
change to array of indexes rather than base64 data
Browse files Browse the repository at this point in the history
  • Loading branch information
orsi committed May 20, 2019
1 parent e8876fb commit 3f521aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/betical.js
Expand Up @@ -67,7 +67,7 @@ class Betical extends HTMLElement {
}

getImgForLetter(letter, styles) {
return `<img src="${letter}" style="${styles}" />`;
return `<img src="${this.letters[letter]}" style="${styles}" />`;
}

createPoem(min, max) {
Expand All @@ -94,7 +94,7 @@ class Betical extends HTMLElement {
var length = Math.floor(Math.random() * (max - min)) + min;
for (var i = 0; i < length; i++) {
var letterIndex = Math.floor(Math.random() * this.letters.length);
word.push(this.letters[letterIndex]);
word.push(letterIndex);
}
return word;
}
Expand Down

0 comments on commit 3f521aa

Please sign in to comment.