diff options
Diffstat (limited to 'src/write/build-modes/live-dev-server.js')
-rw-r--r-- | src/write/build-modes/live-dev-server.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/write/build-modes/live-dev-server.js b/src/write/build-modes/live-dev-server.js index 8af37d3a..d39b6fdf 100644 --- a/src/write/build-modes/live-dev-server.js +++ b/src/write/build-modes/live-dev-server.js @@ -99,10 +99,14 @@ export async function go({ pageSpec, target, targetless, - }) => () => - targetless - ? [pageSpec.writeTargetless({wikiData})] - : pageSpec.pathsForTarget(target))).flat(); + }) => () => { + if (targetless) { + const result = pageSpec.writeTargetless({wikiData}); + return Array.isArray(result) ? result : [result]; + } else { + return pageSpec.pathsForTarget(target); + } + })).flat(); logInfo`Will be serving a total of ${pages.length} pages.`; @@ -337,7 +341,7 @@ export async function go({ urls, }); - const {name, args} = page.contentFunction; + const {name, args = []} = page.contentFunction; const bound = bindUtilities({ absoluteTo, |