use new split to keep emoji integrity

This commit is contained in:
Mylloon 2022-06-25 19:54:15 +02:00
parent 446461f5f7
commit c60d2d3900
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -49,7 +49,7 @@ const setString = (firstname = String, data = Object) => {
string_div.innerHTML = ""; string_div.innerHTML = "";
// For each letter of the first name // For each letter of the first name
firstname.split("").forEach(letter_value => { [...firstname].forEach(letter_value => {
// Create the letter // Create the letter
const letter = document.createElement("p"); const letter = document.createElement("p");
@ -108,7 +108,7 @@ const clearText = (string = String) => {
const getConst = (letters = String) => { const getConst = (letters = String) => {
// Turn letters to an array // 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 // Store constants of each letters of the first name
const const_data = []; const const_data = [];