use new split to keep emoji integrity
This commit is contained in:
parent
446461f5f7
commit
c60d2d3900
1 changed files with 2 additions and 2 deletions
|
@ -49,7 +49,7 @@ const setString = (firstname = String, data = Object) => {
|
|||
string_div.innerHTML = "";
|
||||
|
||||
// For each letter of the first name
|
||||
firstname.split("").forEach(letter_value => {
|
||||
[...firstname].forEach(letter_value => {
|
||||
// Create the letter
|
||||
const letter = document.createElement("p");
|
||||
|
||||
|
@ -108,7 +108,7 @@ const clearText = (string = String) => {
|
|||
|
||||
const getConst = (letters = String) => {
|
||||
// Turn letters to an array
|
||||
const letters_array = clearText(letters).split("");
|
||||
const letters_array = [...clearText(letters)];
|
||||
|
||||
// Store constants of each letters of the first name
|
||||
const const_data = [];
|
||||
|
|
Loading…
Reference in a new issue