Commit 7e1935d5 authored by Romain Courteaud's avatar Romain Courteaud

ReplicateStorage: use .push to add an element to an array

parent e38e542a
...@@ -875,7 +875,6 @@ ...@@ -875,7 +875,6 @@
signature_dict[signature_allDocs.data.rows[i].id] = i; signature_dict[signature_allDocs.data.rows[i].id] = i;
} }
} }
i = 0;
for (key in local_dict) { for (key in local_dict) {
if (local_dict.hasOwnProperty(key)) { if (local_dict.hasOwnProperty(key)) {
is_modification = signature_dict.hasOwnProperty(key) is_modification = signature_dict.hasOwnProperty(key)
...@@ -883,7 +882,7 @@ ...@@ -883,7 +882,7 @@
is_creation = !signature_dict.hasOwnProperty(key) is_creation = !signature_dict.hasOwnProperty(key)
&& options.check_creation; && options.check_creation;
if (is_modification === true || is_creation === true) { if (is_modification === true || is_creation === true) {
argument_list[i] = [undefined, context, skip_document_dict, argument_list.push([undefined, context, skip_document_dict,
source, destination, source, destination,
key, key,
options.conflict_force, options.conflict_force,
...@@ -891,8 +890,7 @@ ...@@ -891,8 +890,7 @@
options.conflict_ignore, options.conflict_ignore,
is_creation, is_modification, is_creation, is_modification,
source.get.bind(source), source.get.bind(source),
options]; options]);
i += 1;
} }
} }
} }
...@@ -906,11 +904,10 @@ ...@@ -906,11 +904,10 @@
); );
}); });
if (options.check_deletion === true) { if (options.check_deletion === true) {
i = 0;
for (key in signature_dict) { for (key in signature_dict) {
if (signature_dict.hasOwnProperty(key)) { if (signature_dict.hasOwnProperty(key)) {
if (!local_dict.hasOwnProperty(key)) { if (!local_dict.hasOwnProperty(key)) {
argument_list_deletion[i] = [undefined, argument_list_deletion.push([undefined,
context, context,
skip_document_dict, skip_document_dict,
destination, key, destination, key,
...@@ -918,8 +915,7 @@ ...@@ -918,8 +915,7 @@
options.conflict_force, options.conflict_force,
options.conflict_revert, options.conflict_revert,
options.conflict_ignore, options.conflict_ignore,
options]; options]);
i += 1;
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment