diff --git a/dist/db/indexeddb/index.js b/dist/db/indexeddb/index.js index 5ffc873..fd14f0a 100644 --- a/dist/db/indexeddb/index.js +++ b/dist/db/indexeddb/index.js @@ -347,15 +347,16 @@ IdxDB.prototype.commit = async function(flexsearch, _replace, _append){ let tasks = flexsearch.commit_task; flexsearch.commit_task = []; for(let i = 0, task; i < tasks.length; i++){ + /** @dict */ task = tasks[i]; // there are just removals in the task queue - if(task.clear){ + if(task["clear"]){ await this.clear(); _replace = true; break; } else { - tasks[i] = task.del; + tasks[i] = task["del"]; } } if(!_replace){ diff --git a/dist/flexsearch.bundle.debug.js b/dist/flexsearch.bundle.debug.js index e8c8358..6f37a66 100644 --- a/dist/flexsearch.bundle.debug.js +++ b/dist/flexsearch.bundle.debug.js @@ -1,5 +1,5 @@ /**! - * FlexSearch.js v0.8.132 (Bundle/Debug) + * FlexSearch.js v0.8.133 (Bundle/Debug) * Author and Copyright: Thomas Wilkerling * Licence: Apache-2.0 * Hosted by Nextapps GmbH @@ -2396,7 +2396,7 @@ t.commit = async function(a, c, b) { c = !0; break; } else { - e[d] = f.W; + e[d] = f.del; } } c || (b || (e = e.concat(aa(a.reg))), e.length && await this.remove(e)); diff --git a/dist/flexsearch.bundle.min.js b/dist/flexsearch.bundle.min.js index 9836b7b..353c525 100644 --- a/dist/flexsearch.bundle.min.js +++ b/dist/flexsearch.bundle.min.js @@ -1,5 +1,5 @@ /**! - * FlexSearch.js v0.8.132 (Bundle) + * FlexSearch.js v0.8.133 (Bundle) * Author and Copyright: Thomas Wilkerling * Licence: Apache-2.0 * Hosted by Nextapps GmbH @@ -94,7 +94,7 @@ t.get=function(a,b,c=0,e=0,d=!0,f=!1){a=this.db.transaction(b?"ctx":"map","reado t.tag=function(a,b=0,c=0,e=!1){a=this.db.transaction("tag","readonly").objectStore("tag").get(a);const d=this;return Z(a).then(function(f){if(!f||!f.length||c>=f.length)return[];if(!b&&!c)return f;f=f.slice(c,c+b);return e?d.enrich(f):f})}; t.enrich=function(a){"object"!==typeof a&&(a=[a]);const b=this.db.transaction("reg","readonly").objectStore("reg"),c=[];for(let e=0;e{d.onerror=k=>{d.abort();d=e=null;g(k)};d.oncomplete=k=>{d=e=null;f(k||!0)};const h=c.call(this,e);this.h[a+":"+b]=null;return h})}; -t.commit=async function(a,b,c){if(b)await this.clear(),a.commit_task=[];else{let e=a.commit_task;a.commit_task=[];for(let d=0,f;d=f.length)return[];if(!b&&!c)return f;f=f.slice(c,c+b);return e?d.enrich(f):f})}; t.enrich=function(a){"object"!==typeof a&&(a=[a]);const b=this.db.transaction("reg","readonly").objectStore("reg"),c=[];for(let e=0;e{d.onerror=k=>{d.abort();d=e=null;g(k)};d.oncomplete=k=>{d=e=null;f(k||!0)};const h=c.call(this,e);this.h[a+":"+b]=null;return h})}; -t.commit=async function(a,b,c){if(b)await this.clear(),a.commit_task=[];else{let e=a.commit_task;a.commit_task=[];for(let d=0,f;d=g.length)return[];if(!b&&!c)return g;g=g.slice(c,c+b);return d?e.enrich(g):g})}; u.enrich=function(a){"object"!==typeof a&&(a=[a]);for(var b=this.db.transaction("reg","readonly").objectStore("reg"),c=[],d=0;d