bugfixes and tweaks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-08-03 11:33:23 +03:00
parent 2b58903675
commit b52351d6fb
3 changed files with 5 additions and 2 deletions

View File

@ -316,7 +316,8 @@ object.Constructor('BasePage', {
match: relMatchProxy('match'),
resolve: relMatchProxy('resolve'),
delete: function(path='.'){
return this.__delete__() },
this.__delete__()
return this },
//
// .get(<path>[, <data>])

View File

@ -44,6 +44,7 @@ var pwpath = require('../lib/path')
// cache/index???
// ...can we avoid this??
//
// XXX might be a good idea to split this into a generic store and a MemStore...
// XXX LEADING_SLASH should this be strict about leading '/' in paths???
// ...this may lead to duplicate paths created -- '/a/b' and 'a/b'
// XXX should we support page symlinking???

View File

@ -49,7 +49,8 @@ module.PouchDBStore = {
return e.id.slice(that.__key_prefix__.length) }) },
// XXX use an index...
__exists__: async function(key){
return !! await this.__get__(key) },
return !!(await this.__get__(key))
&& key },
__get__: async function(key){
try{
return await this.data.get(this.__key_prefix__ + key)