From f383f8dfdeefb7ead76494179da09ee74cd139ac Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 21 Oct 2022 10:05:24 +0300 Subject: [PATCH] found a bug... Signed-off-by: Alex A. Naanou --- pwiki/store/base.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pwiki/store/base.js b/pwiki/store/base.js index b405df5..5d184d8 100755 --- a/pwiki/store/base.js +++ b/pwiki/store/base.js @@ -1069,16 +1069,18 @@ module.MetaStore = { return object.parentCall(MetaStore.__xpaths_merge__, this, ...arguments) .iter() .concat(stores) }, - // XXX + // XXX BUG: + // (reload) + // pwiki.store.xnames + // pwiki.store.substores['Stores/memory'].index('update', 'a/b/c/xxx', {}) + // pwiki.store.xnames // does not change... __xpaths_test__: function(t){ if(!this.substores){ return true } // match substore list... - var cur = Object.keys(this.substores) - var prev = this.__xpaths_substores - if(!prev){ - this.__xpaths_substores = cur - } else if(prev.length != cur.length + var cur = Object.keys(this.substores ?? {}) + var prev = this.__xpaths_substores ?? cur ?? [] + if(prev.length != cur.length || (new Set([...cur, ...prev])).length != cur.length){ return false } // check timestamps...