From caaf19b7b7f7dc55210eac2e949cfa07490a1c82 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 22 Oct 2022 02:03:27 +0300 Subject: [PATCH] minor refactoring... Signed-off-by: Alex A. Naanou --- pwiki/store/base.js | 6 +++--- pwiki2.js | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pwiki/store/base.js b/pwiki/store/base.js index c020e8b..73e1957 100755 --- a/pwiki/store/base.js +++ b/pwiki/store/base.js @@ -171,7 +171,7 @@ function(name, generate, options={}){ // check dependencies... } else if(meth.options.depends){ for(var dep of meth.options.depends){ - if(this[`__${this[dep].attr}_modified`] > cur){ + if(this[`__${this[dep].index}_modified`] > cur){ delete this[cache] break } } } } // action: other... @@ -209,7 +209,7 @@ function(name, generate, options={}){ // generate... : _make.call(this)) ) }, { - attr: name, + index: name, indexed: true, options, })) } @@ -265,7 +265,7 @@ object.Mixin('IndexManagerMixin', { this.index_attrs .map(async function(name){ return [ - that[name].attr, + that[name].index, await that[name](action, ...args), ] }))) }, }) diff --git a/pwiki2.js b/pwiki2.js index 147c19c..59a2ff5 100755 --- a/pwiki2.js +++ b/pwiki2.js @@ -17,6 +17,7 @@ * - CLI * * +* XXX odd bug: in node .xpaths seems to get invalidated on each call... * XXX INDEX / CACHE: * - centralized * - nestable