Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Корякин Александр #108

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
test
  • Loading branch information
SirMajesty committed Oct 27, 2018
commit 436bc9e6b002cac5a0968fea0931e4c441358ea5
3 changes: 1 addition & 2 deletions phone-book.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ function add(phone, name, email) {
* @returns {Boolean}
*/
function update(phone, name, email) {
if (typeof(phoneBook[phone]) !== 'undefined' && checkName(name) && checkEmail(email) &&
(phoneBook[phone][0] !== name || phoneBook[phone][1] !== email)) {
if (typeof(phoneBook[phone]) !== 'undefined' && checkName(name) && checkEmail(email)) {
phoneBook[phone] = [name, email];

return true;
Expand Down