mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-12-24 19:14:09 +01:00
Avoid creating duplicates on diff mode
So we don't have more than 2x as much of entries on this mode
This commit is contained in:
parent
babb9fdd5a
commit
98e60fc14b
1 changed files with 6 additions and 7 deletions
|
@ -146,12 +146,12 @@ async function init(){
|
|||
a[c.id] = c;
|
||||
return a;
|
||||
},{});
|
||||
let removedEntries = liveJson.map(function(entry) {
|
||||
if(atlasReduced[entry.id] === undefined){
|
||||
entry.diff = "delete";
|
||||
}
|
||||
return entry;
|
||||
});
|
||||
let removedEntries = liveJson.filter(entry =>
|
||||
atlasReduced[entry.id] === undefined
|
||||
).map(entry => {
|
||||
entry.diff = "delete"
|
||||
return entry
|
||||
})
|
||||
atlas.push(...removedEntries)
|
||||
|
||||
if(mode.includes("only")){
|
||||
|
@ -159,7 +159,6 @@ async function init(){
|
|||
return typeof entry.diff == "string"
|
||||
});
|
||||
}
|
||||
|
||||
//TEMP FOR TIME TRAVEL
|
||||
atlasBackup = atlas;
|
||||
} catch (error) {
|
||||
|
|
Loading…
Reference in a new issue