Update Worker.js

How in the world! I thought I checked this yesterday! In any case, the append should not be limited this way. Breaks search.
This commit is contained in:
Mark Washeim 2022-12-23 17:39:35 +01:00 committed by GitHub
parent ba5ef7432e
commit 3bb76d7121
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -162,7 +162,8 @@ function addDataToModel (model, mode, items) {
console.log("Fetched > " +length + " in " + mode)
var i
if (mode === "append") {
model.append(items)
/*
for(i = 0; i <= length-1; i++) {
if ( knownIds.indexOf( items[i]["id"]) === -1) {
if ( items[i]["id"] < max_id ) {
@ -172,6 +173,7 @@ function addDataToModel (model, mode, items) {
}
}
}
*/
} else if (mode === "prepend") {
for(i = length-1; i >= 0 ; i--) {
if ( knownIds.indexOf( items[i]["id"]) === -1) {