From a4923837565c77537d644fb5df5ed80d6973e371 Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger Date: Fri, 15 Mar 2024 13:36:38 -0700 Subject: [PATCH] don't create xref index on single-file projects --- src/command/render/crossref.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/command/render/crossref.ts b/src/command/render/crossref.ts index 9699cdf2fb..97f4c7ef4f 100644 --- a/src/command/render/crossref.ts +++ b/src/command/render/crossref.ts @@ -42,7 +42,7 @@ export function crossrefFilterParams( // validation if (option === kNumberOffset) { // coerce scalar number-offset to array - if (typeof (value) === "number") { + if (typeof value === "number") { value = [value]; } // validate we have an array @@ -66,7 +66,7 @@ export function crossrefFilterParams( params[kNumberDepth] = metadata?.[kNumberDepth]; // always create crossref index for projects - if (options.project) { + if (!options.project?.isSingleFile) { // if its a book then only write for multi-file (as otherwise all of the // crossref entries will end in a single index file) if (