We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6bb7e2 commit e155079Copy full SHA for e155079
src/ParseOp.js
@@ -199,16 +199,14 @@ export class AddUniqueOp extends Op {
199
return this._value || [];
200
}
201
if (Array.isArray(value)) {
202
- // copying value lets Flow guarantee the pointer isn't modified elsewhere
203
- const valueCopy = value;
204
const toAdd = [];
205
this._value.forEach((v) => {
206
if (v instanceof ParseObject) {
207
- if (!arrayContainsObject(valueCopy, v)) {
+ if (!arrayContainsObject(value, v)) {
208
toAdd.push(v);
209
210
} else {
211
- if (valueCopy.indexOf(v) < 0) {
+ if (value.indexOf(v) < 0) {
212
213
214
0 commit comments