score:1

Accepted answer

unshift returns the new length of the array, and not the array itself.

you can do unshift first, and then return the array instead.

@computed get countries() {
  var empty = { id: 0, name: '' };
  var test = this.referencedata.filter(x => x.propertyname === "country");

  test.unshift(empty);

  return test; 
}

Related Query

More Query from same tag