Skip to content
Snippets Groups Projects
Commit 9f97da5b authored by Risto Luukkonen's avatar Risto Luukkonen
Browse files

case sensitivity from names taken off

parent b54395fc
Branches
Tags
No related merge requests found
......@@ -27,10 +27,8 @@ class App extends React.Component {
}).catch(console.log('contact to the server'))
}
// (part 2) method to check whether param1 (=list) contains param2 (=comparable).
// (part 3 update) this is obsolete due to changes in addPerson()-method
isUnique = (list,comparable) =>{
var unique = list.filter(a=> comparable===a.name)
var unique = list.filter(a=> comparable.toUpperCase() ===a.name.toUpperCase())
if(unique.length>0){
return false
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment