Build a Record Collection - stuck on test 3

Hey there. I’m working on the Build a Record Collection lab and I can get every test to pass except for test 3. It only returns one track like the prompt asks, so i’m not sure what’s wrong here. Can anybody help?

Here is my code:

function updateRecords(records, id, prop, value) {
  if (value == "") {
    delete records[id][prop];
    console.log(records[id]);
    return records;
  }
  else if (prop == "tracks" && value !== "" && records[id].hasOwnProperty("tracks") == false) {
    records[id][prop] = value;
    console.log(records[id])
    return records;
  }
  else if (prop == "tracks" && value !== "") {
    records[id][prop].push(value);
    console.log(records[id])
    return records;
  }
  else {
    records[id][prop] = value;
    console.log(records);
    return records;
  }
}

and here is the output I get:

{ albumTitle: 'ABBA Gold', tracks: 'Take a Chance on Me' }

sorry for all the console.logs! Because the freecodecamp editor doesn’t always tell me answers, I compile it in an outside editor that tells me the errors and outputs more reliably

Welcome to the forum @thenerdybirdy,

Isn’t the recordCollection tracks value supposed to be an array?

But that’s not what it is here.

Happy coding

Ah, so that’s what I was missing! Thank you so much!

I changed that bit to an empty array and then pushed the value into it and that solved it.