fix no-firstname error

This commit is contained in:
Mylloon 2022-06-23 13:56:52 +02:00
parent 919e74aa37
commit 71a8c6e7fc
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -13,9 +13,11 @@ const main = () => {
// Callback: called when firstname is changed // Callback: called when firstname is changed
const update_const = () => { const update_const = () => {
const firstname = document.getElementById(input_name).value; const firstname = document.getElementById(input_name).value;
const data = get_const(firstname.toLowerCase().split("")); if(firstname.length) {
const data = get_const(firstname.toLowerCase().split(""));
console.log(`output: ${data.const} - ${JSON.stringify(data.infos)}`); console.log(`output: ${data.const} - ${JSON.stringify(data.infos)}`);
}
}; };
const get_const = (letters = Array) => { const get_const = (letters = Array) => {