Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Roque
jio
Commits
7e1935d5
Commit
7e1935d5
authored
May 04, 2017
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ReplicateStorage: use .push to add an element to an array
parent
e38e542a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
src/jio.storage/replicatestorage.js
src/jio.storage/replicatestorage.js
+4
-8
No files found.
src/jio.storage/replicatestorage.js
View file @
7e1935d5
...
@@ -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
;
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment