I think my solution to "Record Collection" lesson is not good. Could you check?

I think my solution to "Record Collection" lesson is not good. Could you check?
0

#1

Here is a codepen:
http://codepen.io/KungFuPandemonium/pen/xOJyQW


#2

Here’s my updateRecords function

function updateRecords(id, prop, value) {  
  if (value === "")    
    delete collection[id][prop];  
  else  if (prop == "tracks"){    
    if (collection[id].tracks === undefined) {
      collection[id].tracks = [];
    }    
    collection[id].tracks.push(value);    
  } else if ( value !== "")
    collection[id][prop] = value;
 
  return collection;
}