0๐
โ
I expect your problem here is with getParams
. As written, getParams
will return an object where the bioinformatics is passed by reference. In other words, params.bioinformatics
and data.bioinformatics
are pointers to the same array. So, when you modify params.bioinformatics
, you see the behavior you are logging. Instead, you might get your bioinformatics property as a copy rather than a reference.
getParams: function () {
return {
organism: this.organism,
species_id: this.speciesID,
bioinformatics: this.bioinformatics.slice(),
// ... more params
}
}
๐คBert
Source:stackexchange.com