From 63539dde4b7a1da54cc5f96bac8b47bbe6156111 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 19 Feb 2023 15:07:38 +0300 Subject: [PATCH] bugfix -- revise... Signed-off-by: Alex A. Naanou --- pwiki/page.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pwiki/page.js b/pwiki/page.js index 9d42768..2e43271 100755 --- a/pwiki/page.js +++ b/pwiki/page.js @@ -2028,6 +2028,7 @@ object.Constructor('Page', BasePage, { // XXX BUG: this does not respect strict of single pages if they do // not exist... // ...see: @macro(..) bug + .each(..) + // FIXED: revise... asPages: async function*(path='.:$ARGS', strict=false){ // options... var args = [...arguments] @@ -2049,6 +2050,10 @@ object.Constructor('Page', BasePage, { yield* page // handle lists in pages (actions, ... etc.)... } else { + // page does not exist... + if(strict + && !(await page.exists())){ + return } var data = await page.data data = data instanceof types.Generator ?