Skip to content

Commit 297a37e

Browse files
committed
Revert "Metadata - error if file doesn’t exists"
This reverts commit a868d8e.
1 parent a868d8e commit 297a37e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/config/metadata.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ export async function includedMetadata(
8080
throw e;
8181
}
8282
} else {
83-
throw new Error(
84-
`The \`metadata-file\` ${yamlFile} doesn't exist. Please check that the path to the file is correct.`,
85-
);
83+
return undefined;
8684
}
8785
})) as Array<Metadata>;
8886

@@ -222,7 +220,7 @@ export function metadataAsFormat(metadata: Metadata): Format {
222220

223221
// coalese ipynb-filter to ipynb-filters
224222
const filter = format.execute[kIpynbFilter];
225-
if (typeof filter === "string") {
223+
if (typeof (filter) === "string") {
226224
typedFormat.execute[kIpynbFilters] = typedFormat.execute[kIpynbFilters] ||
227225
[];
228226
typedFormat.execute[kIpynbFilters]?.push(filter);
@@ -304,7 +302,7 @@ export function mergeProjectMetadata<T>(
304302
return mergeConfigsCustomized<T>(
305303
(objValue: unknown, srcValue: unknown, key: string) => {
306304
if (
307-
kExandableStringKeys.includes(key) && typeof objValue === "string"
305+
kExandableStringKeys.includes(key) && typeof (objValue) === "string"
308306
) {
309307
return srcValue;
310308
} else {
@@ -363,7 +361,7 @@ export function mergeDisablableArray(objValue: unknown, srcValue: unknown) {
363361

364362
export function mergePandocVariant(objValue: unknown, srcValue: unknown) {
365363
if (
366-
typeof objValue === "string" && typeof srcValue === "string" &&
364+
typeof (objValue) === "string" && typeof (srcValue) === "string" &&
367365
(objValue !== srcValue)
368366
) {
369367
// merge srcValue into objValue

0 commit comments

Comments
 (0)