Skip to content

Commit

Permalink
Revert "Metadata - error if file doesn’t exists"
Browse files Browse the repository at this point in the history
This reverts commit a868d8e.
  • Loading branch information
dragonstyle committed Feb 14, 2024
1 parent a868d8e commit 297a37e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/config/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ export async function includedMetadata(
throw e;
}
} else {
throw new Error(
`The \`metadata-file\` ${yamlFile} doesn't exist. Please check that the path to the file is correct.`,
);
return undefined;
}
})) as Array<Metadata>;

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

// coalese ipynb-filter to ipynb-filters
const filter = format.execute[kIpynbFilter];
if (typeof filter === "string") {
if (typeof (filter) === "string") {
typedFormat.execute[kIpynbFilters] = typedFormat.execute[kIpynbFilters] ||
[];
typedFormat.execute[kIpynbFilters]?.push(filter);
Expand Down Expand Up @@ -304,7 +302,7 @@ export function mergeProjectMetadata<T>(
return mergeConfigsCustomized<T>(
(objValue: unknown, srcValue: unknown, key: string) => {
if (
kExandableStringKeys.includes(key) && typeof objValue === "string"
kExandableStringKeys.includes(key) && typeof (objValue) === "string"
) {
return srcValue;
} else {
Expand Down Expand Up @@ -363,7 +361,7 @@ export function mergeDisablableArray(objValue: unknown, srcValue: unknown) {

export function mergePandocVariant(objValue: unknown, srcValue: unknown) {
if (
typeof objValue === "string" && typeof srcValue === "string" &&
typeof (objValue) === "string" && typeof (srcValue) === "string" &&
(objValue !== srcValue)
) {
// merge srcValue into objValue
Expand Down

0 comments on commit 297a37e

Please sign in to comment.