value conversion error fix

This commit is contained in:
Adam 2020-02-06 00:24:08 +02:00
parent 1dfd23f737
commit afee0d5704

View file

@ -26,7 +26,7 @@ const attachClick = (selector, handler) =>{
document.querySelector(selector).addEventListener('click', (event) => {
const element = event.target;
const name = event.target.getAttribute('name');
const value = !!+event.target.getAttribute('value');
const value = event.target.getAttribute('value');
typeof handler==='function' ? handler(element, name, value): null;
});
}