bugfix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-02-12 17:57:53 +03:00
parent b42584a957
commit 723437651d
2 changed files with 3 additions and 6 deletions

View File

@ -2014,10 +2014,6 @@ object.Constructor('Page', BasePage, {
// XXX EXPERIMENTAL
// XXX would be nice to be able to chain .awaitOrRun(..) calls instead
// of nesting them like here...
// XXX BUG: this breaks on:
// pwiki = reqiter('./pwiki-test').pwiki
// await pwiki.get('./_text').text
// ...seems to break the original vetsion too...
get text(){
var that = this
return Promise.awaitOrRun(

View File

@ -621,8 +621,9 @@ module.BaseParser = {
return that.resolve(page, e, state)
// data -- unwrap content...
} else if(e instanceof Object && 'data' in e){
return that.resolve(page, e.data, state)
.then(function(e){
return Promise.awaitOrRun(
that.resolve(page, e.data, state),
function(e){
return { data: e } })
// skipped items...
} else if(e instanceof Object && e.skip){