Record Collection. Is there a bug?

I have written the following code to solve JS Record Collection challenge:

function updateRecords(id, prop, value) {
    if (value!='' && prop=='tracks') {
      if (!collection[id].tracks) {
      collection[id].tracks = [];
      } else {
    } else if (value!='') {
  return collection;

But everytime I run it, these 2 commands don’t get executed (FCC says empty strings must not change the corresponding property):

updateRecords(2548, "artist", "")


updateRecords(2548, "tracks", "")

I have run that same function I wrote on Google Dev tools and both “tracks” and ‘artist’ don’t change. Why then FCC evaluates it as incorrect? (Here is the link to challenge:

If value is empty, the corresponding prop is supposed to be deleted.

1 Like