@@ -80,7 +80,9 @@ export async function includedMetadata(
8080 throw e ;
8181 }
8282 } else {
83- return undefined ;
83+ throw new Error (
84+ `The \`metadata-file\` ${ yamlFile } doesn't exist. Please check that the path to the file is correct.` ,
85+ ) ;
8486 }
8587 } ) ) as Array < Metadata > ;
8688
@@ -220,7 +222,7 @@ export function metadataAsFormat(metadata: Metadata): Format {
220222
221223 // coalese ipynb-filter to ipynb-filters
222224 const filter = format . execute [ kIpynbFilter ] ;
223- if ( typeof ( filter ) === "string" ) {
225+ if ( typeof filter === "string" ) {
224226 typedFormat . execute [ kIpynbFilters ] = typedFormat . execute [ kIpynbFilters ] ||
225227 [ ] ;
226228 typedFormat . execute [ kIpynbFilters ] ?. push ( filter ) ;
@@ -302,7 +304,7 @@ export function mergeProjectMetadata<T>(
302304 return mergeConfigsCustomized < T > (
303305 ( objValue : unknown , srcValue : unknown , key : string ) => {
304306 if (
305- kExandableStringKeys . includes ( key ) && typeof ( objValue ) === "string"
307+ kExandableStringKeys . includes ( key ) && typeof objValue === "string"
306308 ) {
307309 return srcValue ;
308310 } else {
@@ -361,7 +363,7 @@ export function mergeDisablableArray(objValue: unknown, srcValue: unknown) {
361363
362364export function mergePandocVariant ( objValue : unknown , srcValue : unknown ) {
363365 if (
364- typeof ( objValue ) === "string" && typeof ( srcValue ) === "string" &&
366+ typeof objValue === "string" && typeof srcValue === "string" &&
365367 ( objValue !== srcValue )
366368 ) {
367369 // merge srcValue into objValue
0 commit comments