Iterate over removed and deleted records when adding record to group
In Javascript for...in iterate over properties but we want to iterate over values with for...of. Otherwise record added back is not un-removed or un-deleted. Closes #12663
This commit is contained in:
1 parent
204a5d7625
commit
f1ab6513b3
1 file changed
+2
-2
+2
-2
@@ -142,13 +142,13 @@
|
||||
if (this.indexOf(record) < 0) {
|
||||
this.splice(position, 0, record);
|
||||
}
|
||||
for (var record_rm in this.record_removed) {
|
||||
for (var record_rm of this.record_removed) {
|
||||
if (record_rm.id == record.id) {
|
||||
this.record_removed.splice(
|
||||
this.record_removed.indexOf(record_rm), 1);
|
||||
}
|
||||
}
|
||||
for (var record_del in this.record_deleted) {
|
||||
for (var record_del of this.record_deleted) {
|
||||
if (record_del.id == record.id) {
|
||||
this.record_deleted.splice(
|
||||
this.record_deleted.indexOf(record_del), 1);
|
||||
|
||||
Reference in new issue
Block a user