From 29c08de27c3e2d81e1ac7e971fd0169d5baa1812 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 18 Nov 2022 03:26:33 +0300 Subject: [PATCH] bugfix... Signed-off-by: Alex A. Naanou --- pwiki/page.js | 10 ++++++++-- pwiki2.js | 13 ------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/pwiki/page.js b/pwiki/page.js index f3cb0cc..7ce7571 100755 --- a/pwiki/page.js +++ b/pwiki/page.js @@ -1756,9 +1756,10 @@ object.Constructor('Page', BasePage, { } else { var data = await page.data data = - typeof(data) == 'function' ? - //data + data instanceof types.Generator ? await data() + : typeof(data) == 'function' ? + data : 'text' in data ? data.text : null @@ -2461,6 +2462,11 @@ module.System = { Time to render: ${time}ms

${text}`}, + + // XXX REMOVE WHEN NOT NEEDED... + TEST: function(){ + console.log('TEST') + return 'TEST' }, // XXX EXPERIMENTAL -- page types... isAction: async function(){ diff --git a/pwiki2.js b/pwiki2.js index d1044b2..68cacb3 100755 --- a/pwiki2.js +++ b/pwiki2.js @@ -36,19 +36,6 @@ * - * * -* XXX BUG /tree/time gives a blank time... -* ...problem: actions seem to be called twice, not yet sure why... -* for an action: -* TEST: async function(){ -* console.log('TEST') -* return 'TEST' }, -* these call it twice: -* await p.pwiki -* .get('/moo/TEST').text -* await p.pwiki -* .get('/moo/TEST') -* .parse('@source(.)') -* XXX check if this applies to .actions * XXX BUG: count does not appear to affect /Test/list/generator and /Test/list/static... * ...do we need to support this??? * XXX BUG: parser: